$ret = 'done';
} else {
// Set status
- $ret = 'pass';
+ $ret = 'password';
}
} // END - if
} // END - if
$ret = 'done';
} else {
// Set status
- $ret = 'pass';
+ $ret = 'password';
}
} // END - if
// Creates a user-profile link for the admin. This function can also be used for many other purposes
function generateUserProfileLink ($userid, $title = '', $what = 'list_user') {
- if (($title == '') && ($userid > 0)) {
+ if (($title == '') && (isValidUserId($userid))) {
// Set userid as title
$title = $userid;
} elseif ($userid == 0) {
incrementStatsEntry('cache_hits');
} elseif (isExtensionInstalledAndNewer('admins', '0.6.7')) {
// Load from database when version of 'admins' is enough
- $result = SQL_QUERY_ESC("SELECT la_mode FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT `la_mode` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1",
array($adminId), __FUNCTION__, __LINE__);
// Do we have an entry?
// Is the raw userid set?
if (postRequestParameter($userid, $id) > 0) {
- // Generate subject
- $subject = '{--MEMBER_' . strtoupper($subject) . '_' . strtoupper($table) . '_SUBJECT--}';
-
// Load email template
if (!empty($subjectPart)) {
$mail = loadEmailTemplate('member_' . $mode . '_' . strtolower($subjectPart) . '_' . $table, $content);
}
// Send email out
- sendEmail(postRequestParameter($userid, $id), $subject, $mail);
+ sendEmail(postRequestParameter($userid, $id), '{--MEMBER_' . strtoupper($subject) . '_' . strtoupper($table) . '_SUBJECT--}', $mail);
} // END - if
// Generate subject
// Send admin notification out
if (!empty($subjectPart)) {
- sendAdminNotification($subject, 'admin_' . $mode . '_' . strtolower($subjectPart) . '_' . $table, $content, postRequestParameter($userid, $id));
+ sendAdminNotification('{--ADMIN_' . strtoupper($subject) . '_' . strtoupper($table) . '_SUBJECT--}', 'admin_' . $mode . '_' . strtolower($subjectPart) . '_' . $table, $content, postRequestParameter($userid, $id));
} else {
- sendAdminNotification($subject, 'admin_' . $mode . '_' . $table, $content, postRequestParameter($userid, $id));
+ sendAdminNotification('{--ADMIN_' . strtoupper($subject) . '_' . strtoupper($table) . '_SUBJECT--}', 'admin_' . $mode . '_' . $table, $content, postRequestParameter($userid, $id));
}
}
} // END - if
} elseif (isset($content[$column])) {
// Unfinished!
- debug_report_bug(__FUNCTION__, __LINE__, ":UNFINISHED: id={$id}/{$column}[".gettype($statusInfo)."] = {$content[$column]}");
+ debug_report_bug(__FUNCTION__, __LINE__, ':UNFINISHED: id=' . $id . ',column=' . $column . '[' . gettype($statusInfo) . '] = ' . $content[$column]);
}
} // END - foreach
// Creates a link to the user's admin-profile
function adminCreateUserLink ($userid) {
// Is the userid set correctly?
- if ($userid > 0) {
+ if (isValidUserId($userid)) {
// Create a link to that profile
return '{%url=modules.php?module=admin&what=list_user&userid=' . bigintval($userid) . '%}';
} // END - if