Skip to content

Not changing your password changes your password #23

@PhantomWatson

Description

@PhantomWatson

This code in UsersController.php:

if (empty($this->request->getData('password'))) {
    $password = $this->Users->getOldPassword($id);
    $user->password = $password;
}
if ($this->Users->save($user)) {

has the effect of changing the user's password to the hash of what their password previously was. So if they ever submit the form without changing their password, their existing password becomes unusable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions