Changeset 13796 for trunk/core/lib/Foswiki/UI/Register.pm
- Timestamp:
- 01/23/12 19:00:19 (4 months ago)
- File:
-
- 1 edited
-
trunk/core/lib/Foswiki/UI/Register.pm (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/core/lib/Foswiki/UI/Register.pm
r13643 r13796 101 101 } 102 102 elsif ( $action eq 'resetPassword' ) { 103 if ( !$session->inContext("passwords_modifyable") ) { 104 throw Foswiki::OopsException( 105 'attention', 106 web => $session->{webName}, 107 topic => $session->{topicName}, 108 def => 'passwords_disabled' 109 ); 110 } 103 111 require Foswiki::UI::Passwords; 104 112 Foswiki::UI::Passwords::resetpasswd($session); … … 287 295 my $cUID = $users->addUser( 288 296 $row->{LoginName}, $row->{WikiName}, 289 $row->{Password}, $row->{Email} 297 $session->inContext("passwords_modifyable") ? $row->{Password} : undef, 298 $row->{Email} 290 299 ); 291 300 $log .= … … 837 846 my $users = $session->{users}; 838 847 try { 839 unless ( defined( $data->{Password} ) ) { 848 unless ( !$session->inContext("passwords_modifyable") || 849 defined( $data->{Password} ) ) { 840 850 841 851 # SMELL: should give consideration to disabling … … 855 865 my $cUID = $users->addUser( 856 866 $data->{LoginName}, $data->{WikiName}, 857 $data->{Password}, $data->{Email} 867 $session->inContext("passwords_modifyable") ? $data->{Password} : undef, 868 $data->{Email} 858 869 ); 859 870 my $log = _createUserTopic( $session, $data );
Note: See TracChangeset
for help on using the changeset viewer.
