aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Report/Update.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-01-20 11:17:30 +0000
committerMatthew Somerville <matthew@mysociety.org>2012-01-20 11:17:30 +0000
commit3b05a634896ee38caf375f7c587ec32e1fb947da (patch)
tree6c54b153be9914c260b3d4e34420e5ac03c71f7d /perllib/FixMyStreet/App/Controller/Report/Update.pm
parentce98919c502c6e34a5469b0ae75746011fbcb7b3 (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.pm3
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;
}