Cakephp Auth Component Tutorial Part 2

  Рет қаралды 13,869

andrewperk

andrewperk

Күн бұрын

Пікірлер: 7
@andrewperk
@andrewperk 13 жыл бұрын
@ryantuosto The $data that is passed in is a different data array than the $this->data array. The reason we rewrote the hashPasswords method was so that we could properly validate the password ourselves rather than it coming in automatically hashed. By checking the $this->data passwords we can compare them before the hash. Then we manually hash them, returning the passed in $data array which is the same as what we just hashed anyways we just did it manually so we can compare them.
@andrewperk
@andrewperk 13 жыл бұрын
@ivolol Because allowing a user to create a password that is really long makes it harder for them to remember.
@andrewperk
@andrewperk 13 жыл бұрын
@abcd321839955 It's been a while but from what I remember when over writing the hashPasswords method for some reason if I don't pass true in as a second argument when calling this method it will not hash the password or will not save it. I can't remember which one. I figured this out from googling around. I looked at the api for the hashPasswords method and it doesn't seem to have a second parameter. Try it out, try not passing true in as a second param. It wont work properly.
@andrewperk
@andrewperk 13 жыл бұрын
@ryantuosto Not gonna lie, I'm not entirely sure the exact differences. All I know is that if I rewrite the hashPasswords method using $data it will not work because password will never match password_confirmation because password $data['User']['password'] comes into the $data array already hashed. Where as $this->data pulls directly from the form I believe, thus $this->data['User']['password'] is the plain password.
@edwinvalencia05
@edwinvalencia05 13 жыл бұрын
Question ..... in hashPassword method, if the driver uses the Auth compoent and POST data is received by containing the fields, automatically performs the hash the password field using this function.
@JoseHNCGroupB2010
@JoseHNCGroupB2010 11 жыл бұрын
Andrew I wander if you could do a User edit with a blank password maybe explain validate on THanks
@phuthanhbp1
@phuthanhbp1 11 жыл бұрын
Hi Andrew ! error "Strict (2048): Declaration of User::beforeSave() should be compatible with Model::beforeSave($options = Array) [APP\Model\User.php, line 2]" why ??????
Cakephp Auth Component Tutorial Part 3
14:31
andrewperk
Рет қаралды 13 М.
Cakephp 2.0 Auth Component Tutorial
54:39
andrewperk
Рет қаралды 79 М.
小丑揭穿坏人的阴谋 #小丑 #天使 #shorts
00:35
好人小丑
Рет қаралды 50 МЛН
Try Not To Laugh 😅 the Best of BoxtoxTv 👌
00:18
boxtoxtv
Рет қаралды 7 МЛН
Ruby on Rails Tutorial Part 9 - Validation & Error Messages
7:14
Cakephp 2.0 Blog Tutorial Update
22:47
andrewperk
Рет қаралды 17 М.
JavaScript Course for Beginners - Your First Step to Web Development
48:17
Programming with Mosh
Рет қаралды 13 МЛН
THE 4 MOST FAVORITE ELECTRONIC PROJECTS OF 2024
15:40
ZAFER YILDIZ
Рет қаралды 39 М.
Every React Concept Explained in 12 Minutes
11:53
Code Bootcamp
Рет қаралды 779 М.
Proxy vs Reverse Proxy vs Load Balancer | Simply Explained
13:19
TechWorld with Nana
Рет қаралды 199 М.
Ruby on Rails Tutorial Part 8 - CRUD - Delete - Destroy Method
4:45
Why's nobody using Astro?
9:26
Maximilian Schwarzmüller
Рет қаралды 17 М.
How Senior Programmers ACTUALLY Write Code
13:37
Thriving Technologist
Рет қаралды 1,6 МЛН
小丑揭穿坏人的阴谋 #小丑 #天使 #shorts
00:35
好人小丑
Рет қаралды 50 МЛН