From 838b8268425ce626a62ac134524bfffaa4c13625 Mon Sep 17 00:00:00 2001 From: Kenichi Ishigaki Date: Sun, 30 Apr 2023 16:43:09 +0900 Subject: [PATCH] Do not reset the submitted values with the current (stored) user information --- .../PAUSE/Web/Controller/User/Cred.pm | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/pause_2017/PAUSE/Web/Controller/User/Cred.pm b/lib/pause_2017/PAUSE/Web/Controller/User/Cred.pm index 4c48b7bac..4b19646c2 100644 --- a/lib/pause_2017/PAUSE/Web/Controller/User/Cred.pm +++ b/lib/pause_2017/PAUSE/Web/Controller/User/Cred.pm @@ -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) { @@ -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;