Fixed a lot of tests and associated code.

This commit is contained in:
James Cole
2017-12-17 14:06:14 +01:00
parent 7d348f25ac
commit b08af77c98
42 changed files with 579 additions and 442 deletions

View File

@@ -223,6 +223,18 @@ class UserRepository implements UserRepositoryInterface
return $user->hasRole($role);
}
/**
* @param User $user
*/
public function unblockUser(User $user): void
{
$user->blocked = 0;
$user->blocked_code = '';
$user->save();
return;
}
/**
* This updates the users email address. Same as changeEmail just without most logging. This makes sure that the undo/confirm routine can't catch this one.
* The user is NOT blocked.

View File

@@ -122,6 +122,11 @@ interface UserRepositoryInterface
*/
public function hasRole(User $user, string $role): bool;
/**
* @param User $user
*/
public function unblockUser(User $user): void;
/**
* This updates the users email address. Same as changeEmail just without most logging. This makes sure that the undo/confirm routine can't catch this one.
* The user is NOT blocked.