Ignore:
Timestamp:
Sep 13, 2012, 7:10:29 PM (12 years ago)
Author:
Eric
Message:

Connection rejection seems to work on user registration when $confguest_access = false;

More tests have to be performed before validation of this trick.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/UserAdvManager/trunk/include/functions.inc.php

    r17891 r17892  
    105105
    106106  // Perform user logout after registration if not validated
    107   if ((isset($conf_UAM[39]) and $conf_UAM[39] == 'true') and !UAM_UsrReg_Verif($user['id']) and !is_admin() and is_webmaster())
     107  if ((isset($conf_UAM[39]) and $conf_UAM[39] == 'true') and !UAM_UsrReg_Verif($user['id']) and !is_admin() and !is_webmaster())
    108108  {
    109109    invalidate_user_cache();
     
    456456    }
    457457  }
    458   elseif ((isset($conf_UAM[39]) and $conf_UAM[39] == 'true') and UAM_UsrReg_Verif($user['id']) == false and is_admin()==false and is_webmaster() == false)
     458  elseif ((isset($conf_UAM[39]) and $conf_UAM[39] == 'true') and !UAM_UsrReg_Verif($user['id']) and !is_admin() and !is_webmaster())
    459459  {
    460460    // Logged-in user cleanup, session destruction and redirected to custom page
    461461    // -------------------------------------------------------------------------
    462     if (UAM_UsrReg_Verif($user['id']))
    463     {
    464       $var2 = "UAM_UsrReg_Verif = True";
    465     }
    466     else
    467     {
    468       $var2 = "UAM_UsrReg_Verif = False";
    469     }
    470    
    471     if (is_admin())
    472     {
    473       $var3 = "is_admin = True";
    474     }
    475     else
    476     {
    477       $var3 = "is_admin = False";
    478     }
    479 
    480     if (is_webmaster())
    481     {
    482       $var4 = "is_webmaster = True";
    483     }
    484     else
    485     {
    486       $var4 = "is_webmaster = False";
    487     }
    488     UAMLog($conf_UAM[39],$var2,$var3,$var4);
    489     //invalidate_user_cache();
    490     //logout_user();
    491     //redirect(UAM_PATH.'rejected.php');
     462    invalidate_user_cache();
     463    logout_user();
     464    redirect(UAM_PATH.'rejected.php');
    492465  }
    493466}
Note: See TracChangeset for help on using the changeset viewer.