7 return $this->getState(
'__role');
12 return $this->getState(
'__id') ? $this->getState(
'__id') : 0;
37 $user = Yii::app()->getModule(
'user')->user($this->
id);
38 $userAttributes = CMap::mergeArray(array(
39 'email' => $user->email,
40 'username' => $user->username,
41 'create_at' => $user->create_at,
42 'lastvisit_at' => $user->lastvisit_at,
43 ), $user->profile->getAttributes());
44 foreach ($userAttributes as $attrName => $attrValue) {
45 $this->setState($attrName, $attrValue);
51 return Yii::app()->getModule(
'user')->user($id);
54 public function user($id = 0)
56 return $this->
model($id);
61 return Yii::app()->getModule(
'user')->getUserByName($username);
66 return Yii::app()->getModule(
'user')->getAdmins();
71 return Yii::app()->getModule(
'user')->isAdmin();