summaryrefslogtreecommitdiff
path: root/framework/Security
diff options
context:
space:
mode:
authorxue <>2007-06-15 16:16:47 +0000
committerxue <>2007-06-15 16:16:47 +0000
commit9df523b4eeb54d97d2040c00599b393df4f88a3e (patch)
tree437024371eb0e8e7a286d8beedaa5de3974f353d /framework/Security
parent1c5ef6e1f330ba409e57b686d214c220988025b7 (diff)
Fixed #651.
Diffstat (limited to 'framework/Security')
-rw-r--r--framework/Security/TUserManager.php7
1 files changed, 5 insertions, 2 deletions
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)