summaryrefslogtreecommitdiffstats
path: root/build/integration/features/bootstrap/Provisioning.php
diff options
context:
space:
mode:
Diffstat (limited to 'build/integration/features/bootstrap/Provisioning.php')
-rw-r--r--build/integration/features/bootstrap/Provisioning.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/build/integration/features/bootstrap/Provisioning.php b/build/integration/features/bootstrap/Provisioning.php
index bf84058c05e..feeb850ae7d 100644
--- a/build/integration/features/bootstrap/Provisioning.php
+++ b/build/integration/features/bootstrap/Provisioning.php
@@ -175,14 +175,15 @@ trait Provisioning {
* @param string $group
*/
public function assureUserBelongsToGroup($user, $group){
+ $previous_user = $this->currentUser;
+ $this->currentUser = "admin";
+
if (!$this->userBelongsToGroup($user, $group)){
- $previous_user = $this->currentUser;
- $this->currentUser = "admin";
$this->addingUserToGroup($user, $group);
- $this->currentUser = $previous_user;
}
- $this->checkThatUserBelongsToGroup($user, $group);
+ $this->checkThatUserBelongsToGroup($user, $group);
+ $this->currentUser = $previous_user;
}
/**