[fusion-commits] r1444 - trunk/MapGuide/php
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Tue Jul 29 17:01:32 EDT 2008
Author: madair
Date: 2008-07-29 17:01:32 -0400 (Tue, 29 Jul 2008)
New Revision: 1444
Modified:
trunk/MapGuide/php/UserManager.php
Log:
add user group info to the FUsion user object
Modified: trunk/MapGuide/php/UserManager.php
===================================================================
--- trunk/MapGuide/php/UserManager.php 2008-07-25 16:07:30 UTC (rev 1443)
+++ trunk/MapGuide/php/UserManager.php 2008-07-29 21:01:32 UTC (rev 1444)
@@ -397,7 +397,12 @@
array_push($prefs, array('name'=>$pref['prefs.name'], 'value'=>$pref['user_prefs.value']));
}
}
- $user = new FusionUser($a['userid'], $a['username'], $a['email'], $prefs );
+ $groups = array();
+ $aGroups = $this->GetGroups($a['username']);
+ for ( $i=0; $i < count($aGroups); $i++) {
+ array_push($groups, $aGroups[$i]['name']);
+ }
+ $user = new FusionUser($a['userid'], $a['username'], $a['email'], $prefs, $groups );
}
return $user;
}
@@ -465,11 +470,12 @@
private $email = '';
private $preferences = array();
- function __construct($id, $username, $email, $preferences) {
+ function __construct($id, $username, $email, $preferences, $groups) {
$this->id = $id;
$this->username = $username;
$this->email = $email;
$this->preferences = $preferences;
+ $this->groups = $groups;
}
function userName() {
@@ -501,6 +507,11 @@
$result .= "</Preference>\n";
}
$result .= "</Preferences>\n";
+ $result .= "<Groups>\n";
+ foreach($this->groups as $group) {
+ $result .= "<Group>$group</Group>\n";
+ }
+ $result .= "</Groups>\n";
$result .= "</User>\n";
return $result;
}
More information about the fusion-commits
mailing list