Fixed a bug where editing a user's profile through the admin interface would use your profile's data.
This commit is contained in:
parent
d4d7cd8db1
commit
3f2abb21e5
1 changed files with 3 additions and 2 deletions
|
|
@ -301,12 +301,13 @@ sub www_editUserGroupSave {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_editUserProfile {
|
||||
my ($output, $f, $a, %data, $method, $values, $category, $label, $default, $previousCategory);
|
||||
my ($output, $f, $a, %user, %data, $method, $values, $category, $label, $default, $previousCategory);
|
||||
if (WebGUI::Privilege::isInGroup(3)) {
|
||||
$output .= '<h1>'.WebGUI::International::get(455).'</h1>';
|
||||
$f = WebGUI::HTMLForm->new;
|
||||
$f->hidden("op","editUserProfileSave");
|
||||
$f->hidden("uid",$session{form}{uid});
|
||||
%user = WebGUI::SQL->buildHash("select fieldName,fieldData from userProfileData where userId=$session{form}{uid}");
|
||||
$a = WebGUI::SQL->read("select * from userProfileField,userProfileCategory
|
||||
where userProfileField.profileCategoryId=userProfileCategory.profileCategoryId
|
||||
order by userProfileCategory.sequenceNumber,userProfileField.sequenceNumber");
|
||||
|
|
@ -331,7 +332,7 @@ sub www_editUserProfile {
|
|||
$f->select($data{fieldName},$values,$label,$default);
|
||||
} else {
|
||||
$default = $session{form}{$data{fieldName}}
|
||||
|| $session{user}{$data{fieldName}}
|
||||
|| $user{$data{fieldName}}
|
||||
|| eval $data{dataDefault};
|
||||
$f->$method($data{fieldName},$label,$default);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue