MoroGasper / yii-usergroups

Automatically exported from code.google.com/p/yii-usergroups
0 stars 0 forks source link

UserController.actionRecovery asks for password when not required #26

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. simple_password_reset=TRUE, user_need_activation=TRUE, 
user_need_approval=FALSE
2. register a new user (providing password)
3. activate the new user

What is the expected output? What do you see instead?
- expected output, user activated -> logout triggered (normal flow)
- instead: after activation, recovery asks for password, even if the password 
was already set at registration time. I guess this is because question and 
answer are not set in my usecase

What version of the product are you using? On what operating system?
v1.8

Please provide any additional information below.

the issue is here:
public function actionRecovery()

    ...
    if (strpos($model->username, '_user') !== 0 && $model->password

        /*&& $model->salt && $model->question && $model->answer*/) {

commenting out as shown above solves the problem in my usecase, but not in a 
clean way :)

Original issue reported on code.google.com by emanuele...@gmail.com on 7 Nov 2011 at 5:25