Changes between Version 11 and Version 12 of Howto_Config


Ignore:
Timestamp:
Dec 8, 2009 5:09:00 AM (3 years ago)
Author:
cchantep
Comment:

multiple host domain

Legend:

Unmodified
Added
Removed
Modified
  • Howto_Config

    v11 v12  
    8585 
    8686Please note that the host-specific configurations will be merged over the main config file what means that they only need to contain the parameters that differ from the main configuration. 
     87 
     88If you want multiple host domain, but also want to avoid user to be able to sign on domain other than theirs (e.g. Avoid user@domain1.com to be able to log in user@domain2.com) -- because settings of one domain must not be used on other --, it's possible to add session check in host-specific config files : 
     89{{{ 
     90// load and check session data 
     91if (session_id() == '') { 
     92  session_start(); 
     93} 
     94 
     95$username = NULL; 
     96 
     97if (isset($_SESSION['auth_time']) && isset($_SESSION['username'])) { 
     98  // is logged in 
     99  $username = $_SESSION['username']; 
     100} 
     101}}} 
     102 
     103With such code in host-specific config file, you can check {{{$username}}} (and its domain).