Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions en/tutorials-and-examples/blog-auth-example/auth.rst
Original file line number Diff line number Diff line change
Expand Up @@ -218,15 +218,15 @@ and add the following::

public function beforeSave($options = array()) {
if (isset($this->data[$this->alias]['password'])) {
$this->data[$this->alias]['password'] = AuthComponent::password($this->data[$this->alias]['password']);
$this->data[$this->alias]['password'] = Security::hash($this->data[$this->alias]['password'], null, true);
}
return true;
}

// ...

So, now every time a user is saved, the password is hashed using the default hashing
provided by the AuthComponent class. We're just missing a template view file for
provided by the Security utility. We're just missing a template view file for
the login function, here it is:

.. code-block:: php
Expand Down