Changes

m
Line 36: Line 36:  
     </main.inc.php>
 
     </main.inc.php>
 
   </pre.inc.php>
 
   </pre.inc.php>
 +
  #3#
 
  </index.php>
 
  </index.php>
 
</source>
 
</source>
Line 44: Line 45:     
After submission of login, the same page (so still index.php is called), we still go inside #1#, then #2# and now the $_POST["username"] is defined. So we check if user and pass are ok (check into database, LDAP, it depends on $dolibarr_main_authentication value in config file). If it's ok, the $login variable is set, so we don't show the form anymore and we set the $_SESSION["dol_login"] so next time we call a page, we never go inside the "if (! isset($_SESSION["dol_login"]))".
 
After submission of login, the same page (so still index.php is called), we still go inside #1#, then #2# and now the $_POST["username"] is defined. So we check if user and pass are ok (check into database, LDAP, it depends on $dolibarr_main_authentication value in config file). If it's ok, the $login variable is set, so we don't show the form anymore and we set the $_SESSION["dol_login"] so next time we call a page, we never go inside the "if (! isset($_SESSION["dol_login"]))".
 +
 +
The #3# is to check business permissions and show the page.
    
= The login modules =
 
= The login modules =