if (REQUEST_ISSET_GET(('mode'))) $add .= "&mode=".REQUEST_GET(('mode'));
/* Creates the list of letters and makes them a link. */
- $alphabet = array(getMessage('_ALL2'),"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z",getMessage('_OTHERS'));
+ $alphabet = explode(',', getMessage('_ALL2') . 'A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z' . getMessage('_OTHERS'));
$num = count($alphabet) - 1;
$OUT = '';
while (list($counter, $ltr) = each($alphabet)) {
$list = array(
'userid' => getMessage('_UID'),
'family' => getMessage('FAMILY_NAME'),
- 'email' => getMessage('ADDY'),
+ 'email' => getMessage('ADDY'),
'REMOTE_ADDR' => getMessage('REMOTE_IP')
);
}
// Create email link to user's account
-function USER_CREATE_EMAIL_LINK($email, $mod='admin') {
+function USER_generateMemberEmailLink($email, $mod='admin') {
// Show contact link only if user is confirmed by default
$locked = " AND `status`='CONFIRMED'";
// Is the extension version fine?
if (GET_EXT_VERSION('user') >= '0.3.4') {
// Get all user ids
- $totalUsers = GET_TOTAL_DATA("CONFIRMED", "user_data", 'userid', "status", true, " AND `rand_confirmed` >= ".getConfig('user_min_confirmed')."");
+ $totalUsers = GET_TOTAL_DATA('CONFIRMED', 'user_data', 'userid', 'status', true, " AND `rand_confirmed` >= ".getConfig('user_min_confirmed')."");
// Do we have at least one?
if ($totalUsers > 0) {
setUserId($uid);
// Try to set session data (which shall normally always work!)
- if ((set_session('userid', $uid )) && (set_session('u_hash', $content['hash']))) {
+ if ((setSession('userid', $uid )) && (setSession('u_hash', $content['hash']))) {
// Update database records
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET total_logins=total_logins+1".$add." WHERE userid=%s LIMIT 1",
array($uid), __FUNCTION__, __LINE__);
list($status) = SQL_FETCHROW($result);
// Create an error code from given status
- $errorCode = GEN_ERROR_CODE_FROM_ACCOUNT_STATUS($status);
+ $errorCode = generateErrorCodeFromUserStatus($status);
} else {
// ID not found!
$errorCode = getCode('WRONG_ID');
if ($status == 'CONFIRMED') {
// Ooppps, this was missing! ;-) We should update the database...
- $NEW_PASS = GEN_PASS();
+ $NEW_PASS = generatePassword();
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET password='%s' WHERE userid=%s LIMIT 1",
array(generateHash($NEW_PASS), $uid), __FUNCTION__, __LINE__);
$msg = LOAD_EMAIL_TEMPLATE('new-pass', array('new_pass' => $NEW_PASS), $uid);
// ... and send it away
- SEND_EMAIL($uid, getMessage('GUEST_NEW_PASSWORD'), $msg);
+ sendEmail($uid, getMessage('GUEST_NEW_PASSWORD'), $msg);
// Output note to user
LOAD_TEMPLATE('admin_settings_saved', false, getMessage('GUEST_NEW_PASSWORD_SEND'));
} else {
// Account is locked or unconfirmed
- $errorCode = GEN_ERROR_CODE_FROM_ACCOUNT_STATUS($status);
+ $errorCode = generateErrorCodeFromUserStatus($status);
// Load URL
- LOAD_URL('modules.php?module=index&what=login&login='.$errorCode);
+ redirectToUrl('modules.php?module=index&what=login&login='.$errorCode);
}
} else {
// ID or email is wrong