(1-1/1)
yet solved the problem in this way, but I think it is not very good
function before_save() { if ($this->is_new_record() || $this->attribute_was('password')) { $this->password = password_hash($this->password, PASSWORD_BCRYPT); } }
(1-1/1)
June 27 2010
April 16, 2013
Subject: how to check the length of the password
in this case the length of the password is not checked because after hashing length of 64 characters
You can enter a blank password, and the condition is satisfied
how to check so as not hashed password is longer than 6 characters