mishamx / yii-user

Yii PHP Framework extension for registration and management users accounts.
http://yii-user.2mx.org/
186 stars 154 forks source link

Password recovery errors on submission of new password #61

Closed davidnewcomb closed 9 years ago

davidnewcomb commented 11 years ago

What steps will reproduce the problem?

  1. Click "Lost Password?".
  2. Enter user name, click Recovery, get email.
  3. Enter link from email.
  4. Enter new password (twice), click Save.

Error (attached) is presented and page fails to load. Tried entering the activation link again and you get the message "Incorrect recovery link."

Password appears to have been changed.

Latest source from github at the time or reporting.

submit-password-recovery

davidnewcomb commented 11 years ago

Fixed: user/components/WebUser.php

public function updateSession()
{

-> if (!$this->id) -> return; $user = Yii::app()->getModule('user')->user($this->id);

ghost commented 9 years ago

Hi all! I solved in a different way.

Just added the following line:

Yii::app()->user->id = $find->id;

Before this line in RecoveryController.php:

$find->save();

After that, you are logged in. Is this a correct solution? Thanks!!

ghost commented 9 years ago

I also used @davidnewcomb's solution for a similar error when activating a new account.

mishamx commented 9 years ago

Fixed 0176ce7