]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Group.php
Update the contact in the background
[friendica.git] / src / Model / Group.php
index 0af10995b4a70e698105993a58ad8b9678930834..feff4661ab6f8856fb916d7b12ffe0eacd7a2099 100644 (file)
@@ -16,6 +16,26 @@ use Friendica\Database\DBA;
  */
 class Group extends BaseObject
 {
+       /**
+        *
+        *
+        * @param int $group_id
+        * @return bool
+        * @throws \Exception
+        */
+       public static function exists($group_id, $uid = null)
+       {
+               $condition = ['id' => $group_id, 'deleted' => false];
+
+               if (isset($uid)) {
+                       $condition = [
+                               'uid' => $uid
+                       ];
+               }
+
+               return DBA::exists('group', $condition);
+       }
+
        /**
         * @brief Create a new contact group
         *