Overview
Comment: | Enregistrer en session le login local, évite de revérifier sa validité à chaque page chargée |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
9f8290a6c6f79aa8c7baf913bc1982da |
User & Date: | bohwaz on 2014-02-13 18:21:26 |
Other Links: | manifest | tags |
Context
2014-02-13
| ||
18:21 | Modification de cotisation check-in: 4555329a38 user: bohwaz tags: trunk | |
18:21 | Enregistrer en session le login local, évite de revérifier sa validité à chaque page chargée check-in: 9f8290a6c6 user: bohwaz tags: trunk | |
17:06 | Ne pas afficher la déconnexion en cas de serveur local check-in: 03ad38bfd7 user: bohwaz tags: trunk | |
Changes
Modified src/include/class.membres.php from [3ac66530b1] to [e5b3c4687e].
︙ | ︙ | |||
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | if (trim(LOCAL_LOGIN) == '') return false; $db = DB::getInstance(); if (is_int(LOCAL_LOGIN) && ($membre = $db->simpleQuerySingle('SELECT * FROM membres WHERE id = ? LIMIT 1;', true, LOCAL_LOGIN))) { return $this->updateSessionData($membre); } elseif ($membre = $db->simpleQuerySingle('SELECT * FROM membres WHERE email = ? LIMIT 1;', true, LOCAL_LOGIN)) { return $this->updateSessionData($membre); } throw new UserException('Le membre ' . LOCAL_LOGIN . ' n\'existe pas, merci de modifier la directive Garradin\LOCAL_LOGIN.'); } public function isLogged() | > > | 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | if (trim(LOCAL_LOGIN) == '') return false; $db = DB::getInstance(); if (is_int(LOCAL_LOGIN) && ($membre = $db->simpleQuerySingle('SELECT * FROM membres WHERE id = ? LIMIT 1;', true, LOCAL_LOGIN))) { $this->_sessionStart(true); return $this->updateSessionData($membre); } elseif ($membre = $db->simpleQuerySingle('SELECT * FROM membres WHERE email = ? LIMIT 1;', true, LOCAL_LOGIN)) { $this->_sessionStart(true); return $this->updateSessionData($membre); } throw new UserException('Le membre ' . LOCAL_LOGIN . ' n\'existe pas, merci de modifier la directive Garradin\LOCAL_LOGIN.'); } public function isLogged() |
︙ | ︙ |