Overview
Comment:Correction message login qui ne marche pas
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | dev
Files: files | file ages | folders
SHA1: 9112f10a85a1e2332e716edcd63ddca4f6e79692
User & Date: bohwaz on 2017-06-08 05:37:26
Other Links: branch diff | manifest | tags
Context
2017-06-08
06:11
make_release: ne pas stocker le nom / ID de l'utilisateur check-in: b238ec38d0 user: bohwaz tags: dev
05:37
Correction message login qui ne marche pas check-in: 9112f10a85 user: bohwaz tags: dev
05:37
Utilisation de KD2\Translate pour obtenir la liste des pays check-in: 1c1f650b03 user: bohwaz tags: dev
Changes

Modified src/www/admin/login.php from [16d6682a67] to [0088f1ea18].

    21     21   
    22     22       header('Content-Type: image/gif');
    23     23       echo base64_decode("R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==");
    24     24   
    25     25       exit;
    26     26   }
    27     27   
    28         -$fail = false;
           28  +$login = null;
    29     29   
    30     30   // Soumission du formulaire
    31     31   if (f('login'))
    32     32   {
    33     33       $form->check('login', [
    34     34           '_id'       => 'required|string',
    35     35           'passe'     => 'required|string',
    36     36           'permanent' => 'boolean',
    37     37       ]);
    38     38   
    39         -    if (!$form->hasErrors() && ($fail = Membres\Session::login(f('_id'), f('passe'), (bool) f('permanent'))))
           39  +    if (!$form->hasErrors() && ($login = Membres\Session::login(f('_id'), f('passe'), (bool) f('permanent'))))
    40     40       {
    41     41           Utils::redirect('/admin/');
    42     42       }
    43     43   }
    44     44   
    45     45   $champs = $config->get('champs_membres');
    46     46   
................................................................................
    47     47   $champ = $champs->get($config->get('champ_identifiant'));
    48     48   
    49     49   $tpl->assign('ssl_enabled', empty($_SERVER['HTTPS']) ? false : true);
    50     50   $tpl->assign('prefer_ssl', (bool)PREFER_HTTPS);
    51     51   $tpl->assign('own_https_url', str_replace('http://', 'https://', utils::getSelfURL()));
    52     52   
    53     53   $tpl->assign('champ', $champ);
    54         -$tpl->assign('fail', $fail);
           54  +$tpl->assign('fail', $login === false);
    55     55   
    56     56   $tpl->display('admin/login.tpl');