From 9df523b4eeb54d97d2040c00599b393df4f88a3e Mon Sep 17 00:00:00 2001 From: xue <> Date: Fri, 15 Jun 2007 16:16:47 +0000 Subject: Fixed #651. --- HISTORY | 1 + framework/Security/TUserManager.php | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/HISTORY b/HISTORY index 32859838..20fa9a77 100644 --- a/HISTORY +++ b/HISTORY @@ -3,6 +3,7 @@ Version 3.1.0 To Be Released BUG: Ticket#621 - TWizardNavigationButtonStyle could not be found (Qiang) BUG: Ticket#627 - Logout did not set correct status to the user object (Qiang) BUG: Ticket#650 - Fixed TMysqlMetaData bug about SHOW FULL TABLES (Qiang) +BUG: Ticket#651 - TUserManager Roles names (from config) should be trimmed (Qiang) BUG: TWizard Sidebar using TDataListItemRenderer has error (Qiang) ENH: Ticket#625 - Added @ to represent authenticated users in auth rules (Qiang) ENH: Ticket#631 - Make TQueue implement Countable as the other collection classes (Knut) diff --git a/framework/Security/TUserManager.php b/framework/Security/TUserManager.php index 60e67df8..28651de8 100644 --- a/framework/Security/TUserManager.php +++ b/framework/Security/TUserManager.php @@ -105,12 +105,15 @@ class TUserManager extends TModule implements IUserManager { foreach($xmlNode->getElementsByTagName('user') as $node) { - $name=strtolower($node->getAttribute('name')); + $name=trim(strtolower($node->getAttribute('name'))); $this->_users[$name]=$node->getAttribute('password'); if(($roles=trim($node->getAttribute('roles')))!=='') { foreach(explode(',',$roles) as $role) - $this->_roles[$name][]=$role; + { + if(($role=trim($role))!=='') + $this->_roles[$name][]=$role; + } } } foreach($xmlNode->getElementsByTagName('role') as $node) -- cgit v1.2.3