aboutsummaryrefslogtreecommitdiffstats
path: root/packages/authng/pkg/authng_peers.inc
diff options
context:
space:
mode:
authorDaniel Stefan Haischt <dsh@pfsense.org>2007-09-12 20:48:25 +0000
committerDaniel Stefan Haischt <dsh@pfsense.org>2007-09-12 20:48:25 +0000
commitcb5c3456a28597699295910383972a5af6b7a5e9 (patch)
tree73c49507682f17686d27f1fa9d8afe2ec4cfc7d5 /packages/authng/pkg/authng_peers.inc
parentafd45e6cdda4eb0197a1bfb52422477c8816886a (diff)
downloadpfsense-packages-cb5c3456a28597699295910383972a5af6b7a5e9.tar.gz
pfsense-packages-cb5c3456a28597699295910383972a5af6b7a5e9.tar.bz2
pfsense-packages-cb5c3456a28597699295910383972a5af6b7a5e9.zip
* bug fixing
* added initial figures to doc dir
Diffstat (limited to 'packages/authng/pkg/authng_peers.inc')
-rw-r--r--packages/authng/pkg/authng_peers.inc16
1 files changed, 9 insertions, 7 deletions
diff --git a/packages/authng/pkg/authng_peers.inc b/packages/authng/pkg/authng_peers.inc
index 65546c41..e1640edc 100644
--- a/packages/authng/pkg/authng_peers.inc
+++ b/packages/authng/pkg/authng_peers.inc
@@ -36,7 +36,7 @@
*/
/* ========================================================================== */
-require_once("authng_classdefs");
+require_once("authng_classdefs.inc");
class PeerFactory extends SingletonInterface {
function __construct() {
@@ -54,7 +54,7 @@ class PeerFactory extends SingletonInterface {
/* Each name links to an entry in config.xml
* Example: <principal_store>xml</principal_store>
*/
- switch ($name) {
+ switch ($store) {
case "xml":
$result = new XMLGroupPeer();
break;
@@ -76,7 +76,7 @@ class PeerFactory extends SingletonInterface {
/* Each name links to an entry in config.xml
* Example: <principal_store>xml</principal_store>
*/
- switch ($name) {
+ switch ($store) {
case "xml":
$result = new XMLUserPeer();
break;
@@ -201,7 +201,7 @@ class AbstractUserPeer {
function isSystemAdmin($username) {
$result = false;
- $user = getUserByName($username);
+ $user = $this->getUserByName($username);
if ($user) {
$result = $user->isSystemAdmin();
@@ -252,7 +252,7 @@ class AbstractGroupPeer {
function getGroupHomePage($groupname) {
$result = false;
- $group = getGroupByName($groupname);
+ $group = $this->getGroupByName($groupname);
if ($group) {
$result = $group->getHome();
@@ -355,6 +355,7 @@ class XMLUserPeer extends AbstractUserPeer {
foreach($config['system']['user'] as $userent) {
$this->user_index[$userent['name']] = $i;
+ $this->addUserFromEnt($userent);
$i++;
}
}
@@ -369,6 +370,7 @@ class XMLUserPeer extends AbstractUserPeer {
/* ========================================================================== */
function addUserFromEnt(&$ent) {
+ print "HURTZ";
$newUser = new AuthngUser();
$newUser->setName($ent['name']);
$newUser->setFullname($ent['fullname']);
@@ -387,7 +389,7 @@ class XMLUserPeer extends AbstractUserPeer {
}
}
- $this->users[] = $newUser;
+ $this->users["${ent['name']}"] = $newUser;
}
function setUserName($id, $name) {
@@ -465,7 +467,7 @@ class XMLGroupPeer extends AbstractGroupPeer {
}
}
- $this->groups[] = $newGoup;
+ $this->groups["${ent['name']}"] = $newGoup;
}
function setGroupName($id, $name) {