public function generatePassword($email, &$new_non_crypted_password) { if (!($user_data = $this->getUserByEmail($email))) { return false; } $this->merge($user_data); $new_non_crypted_password = User::generatePassword(); $crypted_password = SimpleAuthenticator::getCryptedPassword($user_data['identifier'], $new_non_crypted_password); $this->set('generated_password', $crypted_password); $this->update(false); return true; }