From: <Ste...@nt...> - 2006-02-12 19:03:33
|
Author: SteffenPoulsen Date: 2006-02-12 11:01:19 -0800 (Sun, 12 Feb 2006) New Revision: 8771 Modified: twiki/branches/DEVELOP/lib/TWiki/User.pm Log: Item1636: Remember e-mail addresses on password reset Modified: twiki/branches/DEVELOP/lib/TWiki/User.pm =================================================================== --- twiki/branches/DEVELOP/lib/TWiki/User.pm 2006-02-12 05:41:12 UTC (rev 8770) +++ twiki/branches/DEVELOP/lib/TWiki/User.pm 2006-02-12 19:01:19 UTC (rev 8771) @@ -283,12 +283,18 @@ my $password = randomPassword(); + # removePassword will probably remove current e-mail addresses, cache a copy + my @tempEmails = $this->emails(); + if( $this->passwordExists() ) { $this->removePassword(); } $this->addPassword( $password ); + # push cached e-mail addresses back on account + $this->setEmails( @tempEmails ); + return $password; } |