]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Contact/Group.php
Merge pull request #12041 from nupplaphil/feat/usersession_Module
[friendica.git] / src / Model / Contact / Group.php
index d9ab8c607bf234591b39548ea5c023ea7fcf9e73..f18e344d03fda4e59402cf0225fc68672862f929 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -36,7 +36,7 @@ class Group
         * @return array
         * @throws \Exception
         */
-       public static function getById(int $gid)
+       public static function getById(int $gid): array
        {
                $return = [];
 
@@ -53,7 +53,7 @@ class Group
                                AND NOT `contact`.`pending`
                                ORDER BY `contact`.`name` ASC',
                                $gid,
-                               local_user()
+                               DI::userSession()->getLocalUserId()
                        );
 
                        if (DBA::isResult($stmt)) {