Changeset 17969


Ignore:
Timestamp:
Sep 17, 2012, 5:38:42 PM (8 years ago)
Author:
flop25
Message:

No more need of rejected.php and tpl (je te laisse les supprimer, si tu valides ce changement)

Location:
extensions/UserAdvManager/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/UserAdvManager/trunk/admin/UAM_admin.php

    r17918 r17969  
    195195      $_POST['UAM_Username_Char'],
    196196      $_POST['UAM_Username_List'],
    197       (isset($_POST['UAM_No_Confirm_Status'])?$_POST['UAM_No_Confirm_Status']:''),
     197      (isset($_POST['UAM_No_Confirm_Status'])?$_POST['UAM_No_Confirm_Status']:''),//7
    198198      $_POST['UAM_MailInfo_Text'],
    199199      $_POST['UAM_ConfirmMail_Text'],
     
    214214      $_POST['UAM_GTAutoMailText'],
    215215      (isset($_POST['UAM_Downgrade_Group'])?$_POST['UAM_Downgrade_Group']:''),
    216       (isset($_POST['UAM_Downgrade_Status'])?$_POST['UAM_Downgrade_Status']:''),
     216      (isset($_POST['UAM_Downgrade_Status'])?$_POST['UAM_Downgrade_Status']:''),//26
    217217      $_POST['UAM_AdminValidationMail_Text'],
    218218      $_POST['UAM_CustomPasswRetr'],
     
    340340
    341341  $conf_UAM = unserialize($conf['UserAdvManager']);
     342  //print_r ($conf_UAM) ;
    342343
    343344  // Group setting for unvalidated, validated users and downgrade group
  • extensions/UserAdvManager/trunk/include/functions.inc.php

    r17968 r17969  
    5959
    6060  $conf_UAM = unserialize($conf['UserAdvManager']);
     61 
    6162
    6263  // Admins, Guests and Adult_Content users are not tracked for Ghost Tracker or Users Tracker
     
    108109      invalidate_user_cache();
    109110      logout_user();
    110       redirect(UAM_PATH.'rejected.php');
     111      if ( $conf['guest_access'] )
     112      {
     113        redirect( make_index_url().'?UAM_msg=rejected', 0);
     114      }
     115      else
     116      {
     117        redirect( get_root_url().'identification.php?UAM_msg=rejected' , 0);
     118      }
    111119    }
    112120  }
     
    472480    invalidate_user_cache();
    473481    logout_user();
    474     redirect(UAM_PATH.'rejected.php');
     482    if ( $conf['guest_access'] )
     483    {
     484      redirect( make_index_url().'?UAM_msg=rejected', 0);
     485    }
     486    else
     487    {
     488      redirect( get_root_url().'identification.php?UAM_msg=rejected' , 0);
     489    }
    475490  }
    476491}
     
    875890}
    876891
     892/**
     893 * Triggered on init
     894 *
     895 * Display a message according to $_GET['UAM_msg']
     896 */
     897function UAM_DisplayMsg()
     898{
     899  if( isset($_GET['UAM_msg']))
     900  {
     901    global $user, $lang, $conf, $page;
     902    $conf_UAM = unserialize($conf['UserAdvManager']);
     903   
     904    if (isset($conf_UAM[40]) and $conf_UAM[40] <> '' and $_GET['UAM_msg']="rejected")
     905    {
     906      // Management of Extension flags ([mygallery], [myurl])
     907      // ---------------------------------------------------
     908      $patterns[] = '#\[mygallery\]#i';
     909      $replacements[] = $conf['gallery_title'];
     910      $patterns[] = '#\[myurl\]#i';
     911      $replacements[] = get_gallery_home_url();
     912   
     913      if (function_exists('get_user_language_desc'))
     914      {
     915        $custom_text = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[40]));
     916      }
     917      else $custom_text = l10n(preg_replace($patterns, $replacements, $conf_UAM[40]));
     918      $page["errors"][]=$custom_text;
     919    }
     920  }
     921}
    877922
    878923/**
     
    32403285   fclose($fo) ;
    32413286}
     3287
    32423288?>
  • extensions/UserAdvManager/trunk/main.inc.php

    r17889 r17969  
    6666add_event_handler('init', 'UAM_InitPage');
    6767
     68// Display messages about Login rejected, etc
     69// ---------------------------
     70add_event_handler('init','UAM_DisplayMsg');
     71add_event_handler('identification','UAM_DisplayMsg');
    6872// PWG_Stuffs module
    6973// -----------------
Note: See TracChangeset for help on using the changeset viewer.