// Is a lock reason set?
if ((isPostRequestParameterSet('lock')) && (getUserData('status') != 'LOCKED')) {
// Ok, lock the account!
- if (getExtensionVersion('user') >= '0.3.5') {
+ 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__);
$ACT = true;
} elseif ((isPostRequestParameterSet('unlock')) && (getUserData('status') == 'LOCKED')) {
// Ok, unlock the account!
- if (getExtensionVersion('user') >= '0.3.5') {
+ if (isExtensionInstalledAndNewer('user', '0.3.5')) {
// Reset lock reason as well
SQL_QUERY_ESC("UPDATE
`{?_MYSQL_PREFIX?}_user_data`