-if ( $ARGS{'ResetAuthToken'} ) {
- my ($status, $msg) = $UserObj->GenerateAuthToken;
- push @results, $msg;
+ push @results, ProcessObjectCustomFieldUpdates( ARGSRef => \%ARGS, Object => $UserObj );
+
+ # Deal with special fields: Privileged, Enabled, and Password
+ if ( $SetPrivileged and $Privileged != $UserObj->Privileged ) {
+ my ($code, $msg) = $UserObj->SetPrivileged( $Privileged );
+ push @results, loc('Privileged status: [_1]', loc_fuzzy($msg));
+ }
+
+ my %password_cond = $UserObj->CurrentUserRequireToSetPassword;
+ if (defined $Pass1 && length $Pass1 ) {
+ my ($status, $msg) = $UserObj->SafeSetPassword(
+ Current => $CurrentPass,
+ New => $Pass1,
+ Confirmation => $Pass2,
+ );
+ push @results, loc("Password: [_1]", $msg);
+ }