Explorar o código

Don't allow Registered users to be assigned tests.

Alan Lam %!s(int64=8) %!d(string=hai) anos
pai
achega
d9d9262227
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      controllers/project_ajax.php

+ 1 - 0
controllers/project_ajax.php

@@ -216,6 +216,7 @@ if($submit) {
 
 
 				$user = $address->getUser();
 				$user = $address->getUser();
 				if($user->level == User::LEVEL_BANNED) throw new Exception("A test cannot be assigned to an banned user.");
 				if($user->level == User::LEVEL_BANNED) throw new Exception("A test cannot be assigned to an banned user.");
+				if($user->level == User::LEVEL_REGISTERED) throw new Exception("A test cannot be assigned to an unverified user.");
 				if($user->level == User::LEVEL_UNVERIFIED) throw new Exception("A test cannot be assigned to an unverified user.");
 				if($user->level == User::LEVEL_UNVERIFIED) throw new Exception("A test cannot be assigned to an unverified user.");
 				if($user->level == User::LEVEL_DEACTIVATED) throw new Exception("A test cannot be assigned to a deactivated user.");
 				if($user->level == User::LEVEL_DEACTIVATED) throw new Exception("A test cannot be assigned to a deactivated user.");
 				if($user->level >= User::LEVEL_VENUE) throw new Exception("A test cannot be assigned to a user that's not a tester.");
 				if($user->level >= User::LEVEL_VENUE) throw new Exception("A test cannot be assigned to a user that's not a tester.");