public function Login($username, $loginContext) { $username = $this->CleanUsername($username); Log::Debug('ActiveDirectory - Login() in with username: %s', $username); if ($this->LdapUserExists()) { Log::Debug('Running ActiveDirectory user synchronization for username: %s, Attributes: %s', $username, $this->user->__toString()); $this->Synchronize($username); } else { Log::Debug('Skipping ActiveDirectory user synchronization, user not loaded'); } return $this->authToDecorate->Login($username, $loginContext); }
public function Login($username, $loginContext) { if ($this->AreCredentialsKnown()) { $username = ServiceLocator::GetServer()->GetHeader('AUTH_USER'); Log::Debug('ActiveDirectory Login trying to load details for authenticated user: %s', $username); } $username = $this->CleanUsername($username); Log::Debug('ActiveDirectory - Login() in with username: %s', $username); if ($this->LdapUserExists()) { Log::Debug('Running ActiveDirectory user synchronization for username: %s, Attributes: %s', $username, $this->user->__toString()); $this->Synchronize($username); } else { Log::Debug('Skipping ActiveDirectory user synchronization, user not loaded'); } return $this->authToDecorate->Login($username, $loginContext); }