Overview
Comment: | Make sure we get true from login, as it can also return ::REQUIRE_OTP |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | dev |
Files: | files | file ages | folders |
SHA3-256: |
a8c5f801cf27f4fd52b89c5cc1ab2cc1 |
User & Date: | bohwaz on 2022-10-15 22:29:08 |
Other Links: | branch diff | manifest | tags |
Context
2022-10-15
| ||
22:29 | Remove menu and config from INI files, continue moving paths check-in: eadb923e2a user: bohwaz tags: dev | |
22:29 | Make sure we get true from login, as it can also return ::REQUIRE_OTP check-in: a8c5f801cf user: bohwaz tags: dev | |
22:28 | Move migration to separate file check-in: e06579be26 user: bohwaz tags: dev | |
Changes
Modified src/include/lib/Garradin/Users/Session.php from [d1765280b5] to [dbea90d4d4].
︙ | ︙ | |||
361 362 363 364 365 366 367 | } public function login($login, $password, $remember_me = false) { $ok = parent::login($login, $password, $remember_me); $user_agent = substr($_SERVER['HTTP_USER_AGENT'] ?? '', 0, 150) ?: null; | | | 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 | } public function login($login, $password, $remember_me = false) { $ok = parent::login($login, $password, $remember_me); $user_agent = substr($_SERVER['HTTP_USER_AGENT'] ?? '', 0, 150) ?: null; if (true === $ok) { Log::add(Log::LOGIN_SUCCESS, compact('user_agent')); // Mettre à jour la date de connexion $this->db->preparedQuery('UPDATE users SET date_login = datetime() WHERE id = ?;', [$this->getUser()->id]); } elseif ($user = $this->getUserForLogin($login)) { Log::add(Log::LOGIN_FAIL, compact('user_agent'), $user->id); |
︙ | ︙ |