More complete rewrite to use wrapper function isExtensionInstalledAndNewer(), some...
[mailer.git] / inc / modules / admin / what-lock_user.php
index c5d68665d1e1932a3c49d97cd87fcf29fdfe15a9..5656c7b34a3f6201a9e17dfe8e992f8e43aa8b40 100644 (file)
@@ -55,7 +55,7 @@ if (isGetRequestParameterSet('userid')) {
                // 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__);
@@ -79,7 +79,7 @@ if (isGetRequestParameterSet('userid')) {
                        $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`