Hi Spyros, THANKS a lot for your work, you save as a lot of time!
Is there a way, maybe without touching the tables by sql, to assign a roll to a user? in this case what I want is to assign a default roll to new users.
Thanks
Juan
Page 1 of 1
assigning a default rol to new users some api?
#2
Posted 07 October 2010 - 08:52 AM
Hi, I finally did this, do you think is the right way?
protected function afterSave()
{
$auth = Yii::app()->authManager;
$auth->assign('userRol', $this->username);
$auth->save();
parent::afterSave();
}
Thanks
protected function afterSave()
{
$auth = Yii::app()->authManager;
$auth->assign('userRol', $this->username);
$auth->save();
parent::afterSave();
}
Thanks
Share this topic:
Page 1 of 1

Help













