Bristol SU Support Package
CheckAdminIsAtLeastUser.php
Go to the documentation of this file.
1 <?php
2 
4 
8 
10 {
11 
15  private $authentication;
20 
22  {
23  $this->authentication = $authentication;
24  $this->userAuthentication = $userAuthentication;
25  }
26 
34  public function handle(Request $request, \Closure $next)
35  {
36  if($this->authentication->getUser() === null) {
37  $this->authentication->setUser(
38  $this->userAuthentication->getUser()->controlUser()
39  );
40  }
41  return $next($request);
42  }
43 
44 }
__construct(Authentication $authentication, UserAuthentication $userAuthentication)