]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/User.php
Merge pull request #13331 from annando/paging-search
[friendica.git] / src / Model / User.php
index 742b8555d7d309963a7e555dde9ed0d4674d5765..89d75849fe9430057a65a34953c718e7b68d516f 100644 (file)
@@ -132,6 +132,17 @@ class User
                return null;
        }
 
+       /**
+        * Get the Uri-Id of the system account
+        *
+        * @return integer
+        */
+       public static function getSystemUriId(): int
+       {
+               $system = self::getSystemAccount();
+               return $system['uri-id'] ?? 0;
+       }
+
        /**
         * Fetch the system account
         *
@@ -1227,7 +1238,7 @@ class User
                DBA::update('user', $fields, ['uid' => $uid]);
 
                $def_gid_groups = Circle::create($uid, DI::l10n()->t('Groups'));
-               if (!$def_gid_groups) {
+               if ($def_gid_groups) {
                        DI::pConfig()->set($uid, 'system', 'default-group-gid', $def_gid_groups);
                }