Skip to content

Commit

Permalink
Merge pull request #408 from charsbar/avoid_resetting_with_saved_values
Browse files Browse the repository at this point in the history
Do not reset the submitted values with the current (stored) user information
  • Loading branch information
andk authored Apr 30, 2023
2 parents 4e6ff84 + 838b826 commit 492d65a
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions lib/pause_2017/PAUSE/Web/Controller/User/Cred.pm
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,19 @@ sub edit {
}
}
}
} else {
for my $field (@allmeta) {
unless ($meta{$field}){
warn "Someone tried strange field[$field], ignored";
next;
}
if ( $field eq "ustatus" ) {
if ( $u->{"ustatus"} eq "active" ) {
next;
}
}
$req->param("pause99_edit_cred_$field" => $u->{$field});
}
}

if ($consistentsubmit) {
Expand Down Expand Up @@ -203,19 +216,6 @@ sub edit {
$dbh->do($sql,undef,$u->{userid});
}
}

for my $field (@allmeta) {
unless ($meta{$field}){
warn "Someone tried strange field[$field], ignored";
next;
}
if ( $field eq "ustatus" ) {
if ( $u->{"ustatus"} eq "active" ) {
next;
}
}
$req->param("pause99_edit_cred_$field" => $u->{$field});
}
}

1;

0 comments on commit 492d65a

Please sign in to comment.