diff options
author | Matthew Somerville <matthew@mysociety.org> | 2012-01-20 11:17:30 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2012-01-20 11:17:30 +0000 |
commit | 3b05a634896ee38caf375f7c587ec32e1fb947da (patch) | |
tree | 6c54b153be9914c260b3d4e34420e5ac03c71f7d /perllib/FixMyStreet/App/Controller/Report/Update.pm | |
parent | ce98919c502c6e34a5469b0ae75746011fbcb7b3 (diff) |
If password field left blank when reporting/updating, ignore that for password setting.
This is so if someone temporarily forgets their password, and uses email confirmation to confirm without setting a new password, their old password isn't lost.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report/Update.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Report/Update.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/Update.pm b/perllib/FixMyStreet/App/Controller/Report/Update.pm index c67ca4d1f..29933e2f6 100644 --- a/perllib/FixMyStreet/App/Controller/Report/Update.pm +++ b/perllib/FixMyStreet/App/Controller/Report/Update.pm @@ -134,7 +134,8 @@ sub process_user : Private { $update->user->name( Utils::trim_text( $params{name} ) ) if $params{name}; - $update->user->password( Utils::trim_text( $params{password_register} ) ); + $update->user->password( Utils::trim_text( $params{password_register} ) ) + if $params{password_register}; return 1; } |