Skip to content

Commit

Permalink
Reindexed roles collection after remove one
Browse files Browse the repository at this point in the history
  • Loading branch information
benatespina committed Oct 5, 2016
1 parent bc97558 commit 617c713
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/BenGorUser/User/Domain/Model/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@ public function revoke(UserRole $aRole)
foreach ($this->roles as $key => $role) {
if ($role->equals($aRole)) {
unset($this->roles[$key]);
$this->roles = array_values($this->roles);
break;
}
throw new UserRoleAlreadyRevokedException();
Expand Down

0 comments on commit 617c713

Please sign in to comment.