6 require_once(BASE.
"wcmf/lib/security/class.User.php");
20 parent::User($oid,
'UserRDB');
22 parent::User($oid, $type);
45 if ($name ==
'login') $displayName =
Message::get(
"login");
46 if ($name ==
'password') $displayName =
Message::get(
"password");
47 if ($name ==
'name') $displayName =
Message::get(
"name");
48 if ($name ==
'firstname') $displayName =
Message::get(
"firstname");
49 if ($name ==
'config') $displayName =
Message::get(
"config");
60 if ($name ==
'password') $description =
Message::get(
"");
62 if ($name ==
'firstname') $description =
Message::get(
"");
76 function getId($unconverted=
false)
191 if ($type ==
'RoleRDB')
195 $children = parent::getChildrenEx(null,
'NMUserRole', array(
'fk_user_id' => $this->
getDBID()), null);
197 $grandChildren = array();
198 for($i=0; $i<
sizeof($children); $i++)
202 $grandChild = &$persistenceFacade->load($children[$i]->getRoleRDBOID(),
BUILDDEPTH_SINGLE);
203 if ($grandChild != null)
206 $grandChild->addChild($children[$i]);
215 parent::loadChildren($type, $buildDepth, $forceUpdate);
227 $children = parent::getChildrenEx(null,
'NMUserRole', array(
'fk_user_id' => $this->
getDBID()), null);
228 $grandChildren = array();
230 for($i=0; $i<
sizeof($children); $i++)
233 $grandChildrenParents = array();
234 foreach ($children[$i]->
getProperty(
'parentoids') as $parentoid)
238 $tmpParents = $children[$i]->getParentsEx($parentoid, null, null, null);
239 if (
sizeof($tmpParents) > 0)
240 $curChildParent = &$tmpParents[0];
243 if ($curChildParent != null)
244 $grandChildrenParents[
sizeof($grandChildrenParents)] = &$curChildParent;
247 for($j=0; $j<
sizeof($grandChildrenParents); $j++)
248 $grandChildren[
sizeof($grandChildren)] = &$grandChildrenParents[$j];
250 return Node::filter($grandChildren, $oid, $type, $values, $properties);
253 return parent::getChildrenEx($oid, $type, $values, $properties);
261 if ($child != null && $child->getType() ==
'RoleRDB')
266 $relOID = $persistenceFacade->getFirstOID(
'NMUserRole', array(
'fk_user_id' => $this->
getDBID(),
'fk_role_id' => $child->getDBID()));
270 $associationNode = &$persistenceFacade->create(
'NMUserRole', BUILDTYPE_SINGLE);
271 $associationNode->setUserRDB($this);
272 $associationNode->setRoleRDB($child);
273 $child->addChild($associationNode);
276 $associationNode = &$persistenceFacade->load($relOID, BUILDTYPE_SINGLE);
278 $child = &$associationNode;
281 parent::addChild($child, $addtype);
294 array_unshift($ids, $this->
getDBID());
298 parent::deleteChild($childOID, $reallyDelete);
getLogin($unconverted=false)
getPassword($unconverted=false)
getValueDescription($name, $type=null)
getId($unconverted=false)
get($message, $parameters=null, $domain='', $lang='')
warn($message, $category)
Abstract base class for user classes that represent a system user.
getName($unconverted=false)
getValue($name, $type=null)
loadChildren($type, $buildDepth=BUILDDEPTH_SINGLE, $forceUpdate=false)
deleteChild($childOID, $reallyDelete=false)
getConfig($unconverted=false)
filter(&$nodeList, $oid, $type, $values, $properties, $useRegExp=true)
getFirstname($unconverted=false)
getOIDParameter($oid, $param, $validate=true)
setValue($name, $value, $type=null, $forceSet=false)
addChild(&$child, $addtype=ADDCHILD_BACK)
UserRDBBase($oid=null, $type=null)
getUnconvertedValue($name, $type=null)
getChildrenEx($oid, $type, $values, $properties)
getValueDisplayName($name, $type=null)