php - CakePHP fills in the password field on create new user failure -


I'm behaving strangely with CakePHP, new user form in my register. This is a pretty original username, email and password form

</

< / P>

"Http://imgur.com/fcpS5.png">

The creation of a new user definitely fails because the password and email fields are empty When form errors are shown, it looks like this:

http: // imgur .com / Za9C4.png

I'm not sure why the password field has magically filled the text, it is not empty Should Ona? Do not name the input field 'password' in the scene, but for example 'new password' . This gives you an opportunity to verify the non-hashed password (length, strength, ..) using callback and it is manually closed later:

  Save before the ceremony () {Parents :: BeforeSave (); If (isset ($ this-> data [$ this- & gt; name] ['newpassword']) & amp; amp; blank ($ this-> data [$ this- & gt; name] ['Newpassword']) [$ this-> data] ['-' 'password'] = security: hash, true); Back true; }  

Comments

Popular posts from this blog

objective c - iPhone and it's wireless area -

unix - Listing all shared memory segments used by a process on AIX5.3+ -

tsql - Correct sql/hql query (aggregate in where clause) -