mirror of
https://framagit.org/hubzilla/core.git
synced 2026-06-21 00:52:33 -04:00
remove check for current user and apply update
This commit is contained in:
29
Zotlabs/Update/_1264.php
Normal file
29
Zotlabs/Update/_1264.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace Zotlabs\Update;
|
||||
|
||||
use Zotlabs\Lib\Config;
|
||||
|
||||
class _1264 {
|
||||
|
||||
function run() {
|
||||
|
||||
dbq("START TRANSACTION");
|
||||
|
||||
$admin_email = trim(Config::Get('system','admin_email'));
|
||||
|
||||
$r = q("UPDATE account SET account_roles = 0 WHERE account_created > '2025-06-24 00:00:00' AND account_email <> '%s'",
|
||||
dbesc($admin_email)
|
||||
);
|
||||
|
||||
if($r) {
|
||||
dbq("COMMIT");
|
||||
return UPDATE_SUCCESS;
|
||||
}
|
||||
|
||||
dbq("ROLLBACK");
|
||||
return UPDATE_FAILED;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
2
boot.php
2
boot.php
@@ -73,7 +73,7 @@ define('PLATFORM_NAME', 'hubzilla');
|
||||
define('STD_VERSION', '10.4.3');
|
||||
define('ZOT_REVISION', '6.0');
|
||||
|
||||
define('DB_UPDATE_VERSION', 1263);
|
||||
define('DB_UPDATE_VERSION', 1264);
|
||||
|
||||
define('PROJECT_BASE', __DIR__);
|
||||
|
||||
|
||||
@@ -145,10 +145,6 @@ function check_account_invite($invite_code) {
|
||||
}
|
||||
|
||||
function check_account_admin($arr) {
|
||||
if (is_site_admin()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$admin_email = trim(Config::Get('system','admin_email'));
|
||||
|
||||
if (strlen($admin_email) && $admin_email === trim($arr['reg_email'])) {
|
||||
|
||||
Reference in New Issue
Block a user