Revision #3 has been created by thyseus on Mar 8, 2010, 11:19:49 AM with the memo:
User::hasRole and 'import', 0.3 rather than 0.2
« previous (#2) next (#4) »
Changes
Title
unchanged
Installing and configurating the Yii User Management Module under a fresh skeleton Application generated by yiic
Category
unchanged
Tutorials
Yii version
unchanged
Tags
unchanged
Content
changed
[...]
Your application has been created successfully under /var/www/testdrive.
~~~
2.) Extract the Yii User Management Module under the modules/ directory
of your new Web Application. Replace the _0.23 with the latest Version
available.[...]
$ mkdir modules
$ cd modules
$ wget http://www.yiiframework.com/extension/yii-user-management/files/User_Management_Module_0.23.tar.bz2
$ tar xvf User_Management_Module_0.
23.tar.bz2
~~~[...]
'User'=>array(
'class' => 'User',
),
'import'=>array(
'application.modules.user.models.*',
~~~[...]
```php
if(Yii::app()->User
->::hasRole('role'))
{
// user is allowed
}
else
{[...]