@@ 167-179 (lines=13) @@ | ||
164 | $logging->logAdmin($user, 'Loginerror\nLogin: '.$faqusername.'\nErrors: '.implode(', ', $user->errors)); |
|
165 | $error = $error.$PMF_LANG['ad_auth_fail']; |
|
166 | } |
|
167 | } else { |
|
168 | // Try to authenticate with cookie information |
|
169 | $user = CurrentUser::getFromCookie($faqConfig); |
|
170 | // authenticate with session information |
|
171 | if (!$user instanceof CurrentUser) { |
|
172 | $user = CurrentUser::getFromSession($faqConfig); |
|
173 | } |
|
174 | if ($user instanceof CurrentUser) { |
|
175 | $auth = true; |
|
176 | } else { |
|
177 | $user = new CurrentUser($faqConfig); |
|
178 | } |
|
179 | } |
|
180 | ||
181 | // logout |
|
182 | if ($action == 'logout' && $auth) { |
@@ 157-171 (lines=15) @@ | ||
154 | $loginVisibility = ''; |
|
155 | $action = 'password' === $action ? 'password' : 'login'; |
|
156 | } |
|
157 | } else { |
|
158 | // Try to authenticate with cookie information |
|
159 | $user = CurrentUser::getFromCookie($faqConfig); |
|
160 | ||
161 | // authenticate with session information |
|
162 | if (!$user instanceof CurrentUser) { |
|
163 | $user = CurrentUser::getFromSession($faqConfig); |
|
164 | } |
|
165 | ||
166 | if ($user instanceof CurrentUser) { |
|
167 | $auth = true; |
|
168 | } else { |
|
169 | $user = new CurrentUser($faqConfig); |
|
170 | } |
|
171 | } |
|
172 | ||
173 | // |
|
174 | // Logout |