public function changePassword(UserPassword $aPassword)
    {
        $this->password = $aPassword;
        $this->rememberPasswordToken = null;
        $this->updatedOn = new \DateTimeImmutable();
    }
public function changePassword(UserPassword $aPassword)
    {
        $this->password = $aPassword;
        $this->rememberPasswordToken = null;
        $this->updatedOn = new \DateTimeImmutable();
    }
public function changePassword ( UserPassword $ aPassword ) { $ this -> password = $ aPassword ; $ this -> rememberPasswordToken = null ; $ this -> updatedOn = new \ DateTimeImmutable ( ) ; }
Updates the user password.

@param UserPassword $aPassword The old password

@throws UserTokenExpiredException when the token is expired
Updates the user password .