* $Author:: $ *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team *
- * For more information visit: http://www.mxchange.org *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team *
+ * For more information visit: http://mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
addYouAreHereLink('admin', __FILE__);
// Is a userid set?
-if (isGetRequestParameterSet('userid')) {
+if (isGetRequestElementSet('userid')) {
// Action not performed by default
- $isActive = false;
+ $isActive = FALSE;
// Load user's data
- if (fetchUserData(getRequestParameter('userid'))) {
+ if (fetchUserData(getRequestElement('userid'))) {
// Is a lock reason set?
if ((isFormSent('lock')) && (getUserData('status') != 'LOCKED')) {
// Ok, lock the account!
if (isExtensionInstalledAndNewer('user', '0.3.5')) {
// Lock with reason
- SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `status`='LOCKED', `lock_reason`='%s', `lock_timestamp`=NOW() WHERE `userid`=%s LIMIT 1",
- array(postRequestParameter('reason'), bigintval(getRequestParameter('userid'))), __FILE__, __LINE__);
+ SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `status`='LOCKED',`lock_reason`='%s',`lock_timestamp`=NOW() WHERE `userid`=%s LIMIT 1",
+ array(postRequestElement('reason'), bigintval(getRequestElement('userid'))), __FILE__, __LINE__);
} else {
// Lock with no lock reason saved
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `status`='LOCKED' WHERE `userid`=%s LIMIT 1",
- array(bigintval(getRequestParameter('userid'))), __FILE__, __LINE__);
+ array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__);
}
// Entry updated?
if (!SQL_HASZEROAFFECTED()) {
// Send an email to the user! In later version you can optionally switch this feature off
- $message = loadEmailTemplate('member_user_locked', array('text' => postRequestParameter('reason')), bigintval(getRequestParameter('userid')));
+ $message = loadEmailTemplate('member_user_locked', array('text' => postRequestElement('reason')), bigintval(getRequestElement('userid')));
// Send away...
- sendEmail(bigintval(getRequestParameter('userid')), '{--ADMIN_LOCKED_SUBJECT--}', $message);
+ sendEmail(bigintval(getRequestElement('userid')), '{--ADMIN_LOCKED_SUBJECT--}', $message);
} // END - if
// Prepare message
- $message = '{%message,ADMIN_USER_ACCOUNT_LOCKED=' . bigintval(getRequestParameter('userid')) . '%}';
- $isActive = true;
- } elseif ((isPostRequestParameterSet('unlock')) && (getUserData('status') == 'LOCKED')) {
+ $message = '{%message,ADMIN_USER_ACCOUNT_LOCKED=' . bigintval(getRequestElement('userid')) . '%}';
+ $isActive = TRUE;
+ } elseif ((isPostRequestElementSet('unlock')) && (getUserData('status') == 'LOCKED')) {
// Ok, unlock the account!
if (isExtensionInstalledAndNewer('user', '0.3.5')) {
// Reset lock reason as well
WHERE
`userid`=%s
LIMIT 1",
- array(bigintval(getRequestParameter('userid'))), __FILE__, __LINE__);
+ array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__);
} else {
// No lock reason to reset
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `status`='CONFIRMED' WHERE `userid`=%s LIMIT 1",
- array(bigintval(getRequestParameter('userid'))), __FILE__, __LINE__);
+ array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__);
}
// Entry updated?
if (!SQL_HASZEROAFFECTED()) {
// Send an email to the user! In later version you can optionally switch this feature off
- $message = loadEmailTemplate('member_user_unlocked', array('text' => postRequestParameter('reason')), bigintval(getRequestParameter('userid')));
+ $message = loadEmailTemplate('member_user_unlocked', array('text' => postRequestElement('reason')), bigintval(getRequestElement('userid')));
// Send away...
- sendEmail(bigintval(getRequestParameter('userid')), '{--ADMIN_UNLOCKED_SUBJECT--}', $message);
+ sendEmail(bigintval(getRequestElement('userid')), '{--ADMIN_UNLOCKED_SUBJECT--}', $message);
if (isExtensionActive('rallye')) {
- addUserToReferalRallye(getRequestParameter('userid'));
+ addUserToReferralRallye(getRequestElement('userid'));
} // END - if
} // END - if
// Prepare message
- $message = '{%message,ADMIN_USER_ACCOUNT_UNLOCKED=' . bigintval(getRequestParameter('userid')) . '%}';
- $isActive = true;
+ $message = '{%message,ADMIN_USER_ACCOUNT_UNLOCKED=' . bigintval(getRequestElement('userid')) . '%}';
+ $isActive = TRUE;
} elseif (isFormSent('delete')) {
// Delete the account
- $isActive = true;
+ $isActive = TRUE;
loadIncludeOnce('inc/modules/admin/what-del_user.php');
- } elseif (isPostRequestParameterSet('no')) {
+ } elseif (isPostRequestElementSet('no')) {
// Do not lock him...
- $url = adminCreateUserLink(getRequestParameter('userid'));
+ $url = adminCreateUserLink(getRequestElement('userid'));
} else {
// Load user data we need
- if (fetchUserData(getRequestParameter('userid'))) {
+ if (fetchUserData(getRequestElement('userid'))) {
// Transfer data to constants for the template
- $content['userid'] = getRequestParameter('userid');
+ $content['userid'] = getRequestElement('userid');
// Realy want to lock?
switch (getUserData('status')) {
}
// Output form
- loadTemplate('admin_lock_user', false, $content);
+ loadTemplate('admin_lock_user', FALSE, $content);
} else {
// Account does not exists!
- loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_MEMBER_404=' . bigintval(getRequestParameter('userid')), '%}');
+ loadTemplate('admin_settings_unsaved', FALSE, '{%message,ADMIN_MEMBER_404=' . bigintval(getRequestElement('userid')), '%}');
}
}
} elseif ($isActive) {
// An action was performed...
if (!empty($message)) {
- loadTemplate('admin_settings_unsaved', false, $message);
+ loadTemplate('admin_settings_unsaved', FALSE, $message);
} else {
displayMessage('{--ADMIN_USER_UPDATED--}');
}
}
} else {
// Account does not exists!
- loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_MEMBER_404=' . bigintval(getRequestParameter('userid')), '%}');
+ loadTemplate('admin_settings_unsaved', FALSE, '{%message,ADMIN_MEMBER_404=' . bigintval(getRequestElement('userid')), '%}');
}
} else {
// List all users