public static function doSelectFiltered(Criteria $criteria, $con = null) { $group = sfContext::getInstance()->getUser()->getAttribute('group', null, 'bo'); if ($group != 'root') { $criteria->add(UserGroupPeer::ID, 1, Criteria::NOT_IN); return parent::doSelect($criteria, $con); } else { return parent::doSelect($criteria, $con); } }
public static function setRightsUser($oUser = false) { self::$RIGHTS_USER = $oUser; }