Skip to content

Commit

Permalink
Fixed issue #13634: Internal Server Error on CDbCommand when edit user
Browse files Browse the repository at this point in the history
Dev: just remove this uneeded )
  • Loading branch information
Shnoulle committed Apr 26, 2018
1 parent bd0c0f4 commit a2fcabb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions application/controllers/admin/useraction.php
Expand Up @@ -318,10 +318,10 @@ public function modifyuser()
{
if (Yii::app()->request->getParam('uid') != '') {
$postuserid = (int) Yii::app()->request->getParam("uid");
if (
if ( /* @todo : move all this logic to Permission::model */
Permission::model()->hasGlobalPermission('superadmin', 'read') // Super admin have all right on user
|| Yii::app()->session['loginID'] == $postuserid // User can edit himself
|| (Permission::model()->hasGlobalPermission('users', 'update') && User::model()->count("uid=:uid AND parent_id=:parent_id)", array(':uid' => $postuserid, 'parent_id' => Yii::app()->session['loginID']))) // User with users update can only update own Users
|| (Permission::model()->hasGlobalPermission('users', 'update') && User::model()->count("uid=:uid AND parent_id=:parent_id", array(':uid' => $postuserid, 'parent_id' => Yii::app()->session['loginID']))) // User with users update can only update own Users
) {
$oUser = User::model()->findByPk($postuserid);
$aData = array();
Expand Down

0 comments on commit a2fcabb

Please sign in to comment.