aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/pageowner.php
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-22 15:57:33 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-22 15:57:33 +0000
commit5ee55d6f037671915f024fcb9ccd51be4f89eb30 (patch)
tree3d2659ecc0bc672b32bcdc2b038c5e9903aaa905 /engine/lib/pageowner.php
parenta25ce4e3c73d36c2eb561c0dceb0168ffb54ec88 (diff)
downloadelgg-5ee55d6f037671915f024fcb9ccd51be4f89eb30.tar.gz
elgg-5ee55d6f037671915f024fcb9ccd51be4f89eb30.tar.bz2
Groups now have usernames of a sort
git-svn-id: https://code.elgg.org/elgg/trunk@1491 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/pageowner.php')
-rw-r--r--engine/lib/pageowner.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/engine/lib/pageowner.php b/engine/lib/pageowner.php
index 57c083f02..3f867e750 100644
--- a/engine/lib/pageowner.php
+++ b/engine/lib/pageowner.php
@@ -28,17 +28,20 @@
}
if ($username = get_input("username")) {
+ if (substr_count($username,'group:')) {
+ preg_match('/group\:([0-9]+)/i',$username,$matches);
+ $guid = $matches[1];
+ if ($entity = get_entity($guid)) {
+ return $entity->getGUID();
+ }
+ }
if ($user = get_user_by_username($username)) {
return $user->getGUID();
- } else {
- return 0;
}
}
if ($owner = get_input("owner_guid")) {
if ($user = get_entity($owner)) {
return $user->getGUID();
- } else {
- return 0;
}
}
if (!empty($CONFIG->page_owner_handlers) && is_array($CONFIG->page_owner_handlers)) {