thyseus, on 14 March 2010 - 09:37 AM, said:
Changelog:
- One can use User::hasRole(array('role1', 'role2')) to check if the User belongs to role 1 OR role 2 (thyseus)
- Rearranged Menu Items more logical (thyseus)
- Much more strict OOP Design (thyseus)
- UserIdentity.php no longer needs to be copied (zephca)
- Created WebUser class to tie in the cookie based user management features to the DB. (zephca)
- Fixed some references to unset objects (zephca)
- Changed directory permissions to 755 and file permissions to 644 so it works better with Git source control (zephca)
- User can log in by username, E-Mail or both depending on loginType (thyseus)
- Added possibility to set up Roles in User form and Users in Role form (thyseus)
Hi,
Found a couple of bugs in 0.4:
ERROR: Property "CWebUser.registrationUrl" is not defined.
In views/user/login.php on line 42 you need to change the line like this:
<?php echo CHtml::link(Yii::t("UserModule.user", "Registration"),Yii::app()->User->registrationUrl); ?> | <?php echo CHtml::link(Yii::t("UserModule.user", "Lost Password?"),Yii::app()->User->recoveryUrl); ?>Note the uppercase 'u' in 'User' - Yii::app()->User->registrationUrl
ERROR: CWebUser does not have a method named "isAdmin".
There are similar errors in views/user/myprofile.php on line 14, 15 and 16:
Change to this:
array('label'=>Yii::t('UserModule.user', 'Manage User'), 'url'=>array('admin'), 'visible' => Yii::app()->User->isAdmin()),
array('label'=>Yii::t('UserModule.user', 'Manage Roles'), 'url'=>array('role/admin'), 'visible' => Yii::app()->User->isAdmin()),
array('label'=>Yii::t('UserModule.user', 'List User'), 'url'=>array('index'), 'visible' => !Yii::app()->User->isAdmin()),There may be others, not checked everything yet.
Edit:
Updating this as I go along...
views/user/profile-edit.php has the same errors on lines 15 and 20.
Just change to Yii::app()->User->isAdmin()
Also similar error littered throughout controllers/UserController.php
Different bugs in models/UserLogin.php
Line 69 change ERROR_STATUS_NOTACTIV to ERROR_STATUS_NOTACTIVE
Line 72 change ERROR_STATUS_BAN to ERROR_STATUS_BANNED

Help



















