From 947c7f99d259c216cc7e02f5fdf1f8ecb46a6f53 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Fri, 26 Aug 2005 16:23:08 +0000 Subject: [PATCH] - User search now includes user alias. - Fixed a bug in the user manager where userId, date created, date updated, and karma were not showing up when editing users. --- docs/changelog/6.x.x.txt | 6 ++++++ lib/WebGUI/Operation/User.pm | 16 +++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 8e7fabf1e..076672e68 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -1,3 +1,9 @@ +6.7.3 + - User search now includes user alias. + - Fixed a bug in the user manager where userId, date created, date updated, + and karma were not showing up when editing users. + + 6.7.2 - fix [ 1163407 ] Ampersand XHTML 1.0 Non-Compliant - fix [ 1243559 ] profile field security vulnerability (Len Kranendonk) diff --git a/lib/WebGUI/Operation/User.pm b/lib/WebGUI/Operation/User.pm index fd448a6c8..5fa538242 100644 --- a/lib/WebGUI/Operation/User.pm +++ b/lib/WebGUI/Operation/User.pm @@ -84,9 +84,11 @@ sub doUserSearch { } $keyword = quote($keyword); my $sql = "select users.userId, users.username, users.status, users.dateCreated, users.lastUpdated, - email.fieldData as email from users left join userProfileData email on users.userId=email.userId and email.fieldName='email' - where $selectedStatus and (users.username like ".$keyword." or email.fieldData like ".$keyword.") - and users.userId not in (".quoteAndJoin($userFilter).") order by users.username"; + email.fieldData as email from users + left join userProfileData email on users.userId=email.userId and email.fieldName='email' + left join userProfileData useralias on users.userId=useralias.userId and useralias.fieldName='alias' + where $selectedStatus and (users.username like ".$keyword." or useralias.fieldData like ".$keyword." or email.fieldData like ".$keyword.") + and users.userId not in (".quoteAndJoin($userFilter).") order by users.username"; if ($returnPaginator) { my $p = WebGUI::Paginator->new(WebGUI::URL::page("op=".$op)); $p->setDataByQuery($sql); @@ -227,10 +229,10 @@ sub www_editUser { $tabform->hidden({name=>"op",value=>"editUserSave"}); $tabform->hidden({name=>"uid",value=>$session{form}{uid}}); $tabform->getTab("account")->raw('  '); - $tabform->getTab("account")->readOnly($session{form}{uid},$i18n->get(378)); - $tabform->getTab("account")->readOnly($u->karma,$i18n->get(537)) if ($session{setting}{useKarma}); - $tabform->getTab("account")->readOnly(epochToHuman($u->dateCreated,"%z"),$i18n->get(453)); - $tabform->getTab("account")->readOnly(epochToHuman($u->lastUpdated,"%z"),$i18n->get(454)); + $tabform->getTab("account")->readOnly(value=>$session{form}{uid},label=>$i18n->get(378)); + $tabform->getTab("account")->readOnly(value=>$u->karma,label=>$i18n->get(537)) if ($session{setting}{useKarma}); + $tabform->getTab("account")->readOnly(value=>epochToHuman($u->dateCreated,"%z"),label=>$i18n->get(453)); + $tabform->getTab("account")->readOnly(value=>epochToHuman($u->lastUpdated,"%z"),label=>$i18n->get(454)); $tabform->getTab("account")->text( -name=>"username", -label=>$i18n->get(50),