Always use the admin when putting poeple in a group
This commit is contained in:
parent
8eb9638490
commit
4e9c3b3d64
|
@ -175,14 +175,15 @@ trait Provisioning {
|
|||
* @param string $group
|
||||
*/
|
||||
public function assureUserBelongsToGroup($user, $group){
|
||||
if (!$this->userBelongsToGroup($user, $group)){
|
||||
$previous_user = $this->currentUser;
|
||||
$this->currentUser = "admin";
|
||||
$this->addingUserToGroup($user, $group);
|
||||
$this->currentUser = $previous_user;
|
||||
}
|
||||
$this->checkThatUserBelongsToGroup($user, $group);
|
||||
$previous_user = $this->currentUser;
|
||||
$this->currentUser = "admin";
|
||||
|
||||
if (!$this->userBelongsToGroup($user, $group)){
|
||||
$this->addingUserToGroup($user, $group);
|
||||
}
|
||||
|
||||
$this->checkThatUserBelongsToGroup($user, $group);
|
||||
$this->currentUser = $previous_user;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue