Beispiel #1
0
 public function init()
 {
     if ($this->_request->getActionName() == 'index') {
         $this->addFilteringTexbox('loginid', 'loginid');
         $this->addFilteringTexbox('firstname', 'firstname');
     }
     $groupid = $this->_request->getParam('groupid', '');
     $userid = $this->getRequestId();
     if ($groupid != '') {
         $group = new Sam_Model_User_Group();
         $group->find($groupid);
         if ($group instanceof Sam_Model_User_Group) {
             $group->addUser($userid);
         }
     }
     $certificateid = $this->_request->getParam('certificate', '');
     if ($certificateid != '') {
         $cer = new Eau_Model_Auditor_Certificate();
         $cer->find($certificateid);
         if ($cer instanceof Eau_Model_Auditor_Certificate) {
             $cer->addUser($userid);
         }
     }
     parent::init();
 }
Beispiel #2
0
 {
     return self::getSession('userGroupId', '');
 }
 public static function getUserGroupName()
 {
     $group = self::getSession('userGroupName', '');
     if ($group == '') {
         $user = Sam_Auth::getInstance()->getUser();
         $gid = $user->getGroupid();
         $group = new Sam_Model_User_Group();
         $group->find($gid);
         $groupname = $group->getName();
         self::setSession('userGroupName', $groupname);
Beispiel #3
0
 /**
  * @return Sam_Model_User_Group
  * Enter description here ...
  */
 public function getGroup()
 {
     //die( "ssssssssss" ) ;
     if ($this->_usergroup == null) {
         $this->_usergroup = Sam_Model_User_Group::getObjectByID($this->getGroupid());
     }
     return $this->_usergroup;
 }
Beispiel #4
0
 /**
  * get Singleton  Sam_Model_User_Group
  *
  * @return Sam_Model_User_Group
  */
 public static function getObjectByID($id)
 {
     $obj = new Sam_Model_User_Group();
     $obj->find($id);
     return $obj;
 }