summaryrefslogtreecommitdiff
path: root/modules/user/helpers/group.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/user/helpers/group.php')
-rw-r--r--modules/user/helpers/group.php21
1 files changed, 18 insertions, 3 deletions
diff --git a/modules/user/helpers/group.php b/modules/user/helpers/group.php
index f4d57275..a47ade37 100644
--- a/modules/user/helpers/group.php
+++ b/modules/user/helpers/group.php
@@ -24,9 +24,6 @@
* Note: by design, this class does not do any permission checking.
*/
class group_Core {
- const EVERYBODY = 0;
- const REGISTERED_USERS = 1;
-
/**
* Create a new group.
*
@@ -45,4 +42,22 @@ class group_Core {
module::event("group_created", $group);
return $group;
}
+
+ /**
+ * The group of all possible visitors. This includes the guest user.
+ *
+ * @return Group_Model
+ */
+ static function everybody() {
+ return ORM::factory("group", 1);
+ }
+
+ /**
+ * The group of all logged-in visitors. This does not include guest users.
+ *
+ * @return Group_Model
+ */
+ static function registered_users() {
+ return ORM::factory("group", 2);
+ }
} \ No newline at end of file