From d36689c70d06c08cc5aaf6c9edaa0b29b5c92142 Mon Sep 17 00:00:00 2001 From: marcus Date: Wed, 25 Jun 2008 12:05:13 +0000 Subject: Fixes #84: Method for retrieving preferences for a user and notifying accordingly http://trac.elgg.org/elgg/ticket/84 git-svn-id: https://code.elgg.org/elgg/trunk@1120 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/sites.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'engine/lib/sites.php') diff --git a/engine/lib/sites.php b/engine/lib/sites.php index 0878bb66b..441a649ad 100644 --- a/engine/lib/sites.php +++ b/engine/lib/sites.php @@ -544,6 +544,21 @@ return false; } + /** + * Retrieve a site and return the domain portion of its url. + * + * @param int $guid + */ + function get_site_domain($guid) + { + $guid = (int)$guid; + + $site = get_entity($site); + if ($site instanceof ElggSite) + return parse_url($site->url, 'host'); + + return false; + } /** * Initialise site handling -- cgit v1.2.3