- Timestamp:
- Aug 21, 2010, 10:51:00 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/NBC_UserAdvManager/branches/2.15/ConfirmMail.php
r6776 r6787 8 8 include_once (UAM_PATH.'include/functions.inc.php'); 9 9 10 // +-----------------------------------------------------------------------+11 // | Check Access and exit when user status is not ok |12 // +-----------------------------------------------------------------------+13 //check_status(ACCESS_NONE);14 load_language('plugin.lang', UAM_PATH);15 16 10 $title= l10n('confirm_mail_page_title'); 17 11 $page['body_id'] = 'theAboutPage'; … … 22 16 23 17 24 if (isset($_GET['key']) )18 if (isset($_GET['key']) and isset($_GET['userid'])) 25 19 { 26 20 27 global $conf; 21 global $user, $lang, $conf, $errors; 22 23 $key = $_GET['key']; 24 $userid = $_GET['userid']; 25 $redirect = false; 28 26 29 27 $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']); 28 $conf_UAM = unserialize($conf['UserAdvManager']); 30 29 31 if (VerifyConfirmMail($ _GET['key']))30 if (VerifyConfirmMail($key)) 32 31 { 33 32 $status = true; 34 33 34 log_user($userid, false); 35 36 /* We have to get the user's language in database */ 37 $query = ' 38 SELECT '.USER_INFOS_TABLE.'.language 39 FROM '.USER_INFOS_TABLE.','.USER_CONFIRM_MAIL_TABLE.' 40 WHERE (('.USER_INFOS_TABLE.'.user_id ='.$userid.') AND ('.USER_INFOS_TABLE.'.user_id = '.USER_CONFIRM_MAIL_TABLE.'.user_id)) 41 ;'; 42 $data = pwg_db_fetch_assoc(pwg_query($query)); 43 44 /* Check if user is already registered (profile changing) - If not (new registration), language is set to current gallery language */ 45 if (empty($data)) 46 { 47 /* And switch gallery to this language before using personalized and multilangual contents */ 48 $language = pwg_get_session_var('lang_switch', $user['language']); 49 switch_lang_to($language); 50 } 51 else 52 { 53 /* And switch gallery to this language before using personalized and multilangual contents */ 54 switch_lang_to($data['language']); 55 load_language('plugin.lang', UAM_PATH); 56 } 57 58 if (function_exists('get_user_language_desc')) 59 { 60 $custom_text = get_user_language_desc($conf_UAM_ConfirmMail[5]); 61 } 62 else $custom_text = l10n($conf_UAM_ConfirmMail[5]); 63 64 if (isset($conf_UAM[21]) and $conf_UAM[21] == 'true') 65 { 66 $user_idsOK = array(); 67 if (!check_consult($userid, $user_idsOK)) 68 { 69 $redirect = true; 70 } 71 } 72 35 73 $template->assign( 36 74 array( 75 'REDIRECT' => $redirect, 37 76 'STATUS' => $status, 38 'CONFIRM_MAIL_MESSAGE' => $c onf_UAM_ConfirmMail[5],77 'CONFIRM_MAIL_MESSAGE' => $custom_text, 39 78 ) 40 79 ); … … 43 82 { 44 83 $status = false; 84 if (function_exists('get_user_language_desc')) 85 { 86 $custom_text = get_user_language_desc($conf_UAM_ConfirmMail[6]); 87 } 88 else $custom_text = l10n($conf_UAM_ConfirmMail[6]); 89 45 90 $template->assign( 46 91 array( 92 'REDIRECT' => $redirect, 47 93 'STATUS' => $status, 48 'CONFIRM_MAIL_MESSAGE' => $c onf_UAM_ConfirmMail[6],94 'CONFIRM_MAIL_MESSAGE' => $custom_text, 49 95 ) 50 96 ); … … 60 106 61 107 if ( isset($conf['gallery_url']) ) 62 108 { 63 109 $template->assign( 64 110 array(
Note: See TracChangeset
for help on using the changeset viewer.