// 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",
+ sqlQueryEscaped("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",
+ sqlQueryEscaped("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `status`='LOCKED' WHERE `userid`=%s LIMIT 1",
array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__);
}
// Entry updated?
- if (!SQL_HASZEROAFFECTED()) {
+ if (!ifSqlHasZeroAffectedRows()) {
// Send an email to the user! In later version you can optionally switch this feature off
$message = loadEmailTemplate('member_user_locked', array('text' => postRequestElement('reason')), bigintval(getRequestElement('userid')));
// Ok, unlock the account!
if (isExtensionInstalledAndNewer('user', '0.3.5')) {
// Reset lock reason as well
- SQL_QUERY_ESC("UPDATE
+ sqlQueryEscaped("UPDATE
`{?_MYSQL_PREFIX?}_user_data`
SET
`status`='CONFIRMED',
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",
+ sqlQueryEscaped("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `status`='CONFIRMED' WHERE `userid`=%s LIMIT 1",
array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__);
}
// Entry updated?
- if (!SQL_HASZEROAFFECTED()) {
+ if (!ifSqlHasZeroAffectedRows()) {
// Send an email to the user! In later version you can optionally switch this feature off
$message = loadEmailTemplate('member_user_unlocked', array('text' => postRequestElement('reason')), bigintval(getRequestElement('userid')));