Skip to content

Commit

Permalink
Fixed rbac roles when save null value.
Browse files Browse the repository at this point in the history
  • Loading branch information
maddoger committed Nov 5, 2015
1 parent a5f7fc0 commit 44aa517
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public function beforeSave($insert)
public function afterSave($insert, $changedAttributes)
{
//RBAC Roles
if ($this->isAttributeSafe('rbacRoles')) {
if ($this->isAttributeSafe('rbacRoles') && $this->_rbacRoles !== null) {

if (!$insert) {
Yii::$app->authManager->revokeAll($this->id);
Expand Down

0 comments on commit 44aa517

Please sign in to comment.