GuestAuth.class.php (593B)
1 <?php 2 3 namespace cms\auth; 4 5 use cms\auth\Auth; 6 use cms\base\Configuration; 7 8 /** 9 * Authentifizierung als Gast-User. 10 * 11 * Falls konfiguriert, wird der Gast-Benutzer voreingestellt. 12 * 13 * @author dankert 14 */ 15 class GuestAuth implements Auth 16 { 17 public function username() 18 { 19 $guestConf = Configuration::subset(['security','guest']); 20 21 if ($guestConf->is('enable',true)) 22 return $guestConf->get('user'); 23 else 24 return null; 25 } 26 27 28 /** 29 * Ueberpruefen des Kennwortes ist über Ident nicht möglich. 30 */ 31 public function login($user, $password, $token) 32 { 33 return Auth::STATUS_FAILED; 34 } 35 }