/** * parameters preparation after a select is executed */ public function afterFind() { if (!$this->notUseAfrefind && Yii::app()->controller->action->id != 'NotSentEmails') { if (!$this->relProfile) { $this->relProfile = new Profile(); $this->relProfile->ug_id = $this->id; $this->relProfile->save(); } // retrieve the group name $this->group_name = $this->relUserGroupsGroup->groupname; // retrieve the user access permission's arra if ((int) $this->id === self::ROOT) { $this->access = self::ROOT_ACCESS; } else { $this->access = UserGroupsAccess::findRules(UserGroupsAccess::USER, $this->id); } // copy the level of it's own group $this->level = $this->relUserGroupsGroup->level; // copy the group home $this->group_home = $this->relUserGroupsGroup->home; //Получение параметров if ($this->params) { $this->params = unserialize($this->params); } else { $this->params = array_keys($this->ParamsFields); } // get the user readable home $home_array = UserGroupsAccess::homeList(); if ($this->home) { $this->readable_home = isset($home_array[$this->home]) ? $home_array[$this->home] : $this->home; } else { $this->readable_home = isset($home_array[$this->group_home]) ? $home_array[$this->group_home] . ' - <i><b>Inherited from Group</b></i>' : $this->group_home; } } parent::afterFind(); }
/** * parameters preparation after a select is executed */ public function afterFind() { // retrieve the group name $this->group_name = $this->relUserGroupsGroup->groupname; // retrieve the user access permission's arra if ((int) $this->id === self::ROOT) { $this->access = self::ROOT_ACCESS; } else { $this->access = UserGroupsAccess::findRules(UserGroupsAccess::USER, $this->id); } // copy the level of it's own group $this->level = $this->relUserGroupsGroup->level; // copy the group home $this->group_home = $this->relUserGroupsGroup->home; // get the user readable home $home_array = UserGroupsAccess::homeList(); if ($this->home) { $this->readable_home = isset($home_array[$this->home]) ? $home_array[$this->home] : $this->home; } else { $this->readable_home = isset($home_array[$this->group_home]) ? $home_array[$this->group_home] . ' - <i><b>Inherited from Group</b></i>' : $this->group_home; } parent::afterFind(); }
/** * parameters preparation after a select is executed */ public function afterFind() { // load the access permissions for the group $this->access = UserGroupsAccess::findRules(UserGroupsAccess::GROUP, $this->id); parent::afterFind(); }