Esempio n. 1
0
     }
 } else {
     if ($profil == 'webmestre' && $login == 'webmestre' && $password != '') {
         $auth_resultat = SessionUser::tester_authentification_webmestre($password);
         if ($auth_resultat == 'ok') {
             SessionUser::initialiser_webmestre();
         }
     } else {
         if ($profil == 'developpeur' && $login == 'developpeur' && $password != '') {
             $auth_resultat = SessionUser::tester_authentification_developpeur($password);
             if ($auth_resultat == 'ok') {
                 SessionUser::initialiser_developpeur();
             }
         } else {
             if ($profil == 'partenaire' && $partenaire != 0 && $password != '' && IS_HEBERGEMENT_SESAMATH && HEBERGEUR_INSTALLATION == 'multi-structures') {
                 list($auth_resultat, $auth_DB_ROW) = SessionUser::tester_authentification_partenaire($partenaire, $password);
                 if ($auth_resultat == 'ok') {
                     SessionUser::initialiser_partenaire($auth_DB_ROW);
                 }
             }
         }
     }
 }
 // Conclusion & Retour
 if ($auth_resultat == 'ok') {
     exit_json(TRUE, adresse_redirection_apres_authentification());
 } else {
     $_SESSION['FORCEBRUTE'][$PAGE]['DELAI']++;
     $_SESSION['FORCEBRUTE'][$PAGE]['TIME'] = $_SERVER['REQUEST_TIME'];
     exit_json(FALSE, $auth_resultat);
 }