/** * Add this user to a particular site * * @param int $site_guid The guid of the site to add it to * @return true|false */ function addToSite($site_guid) { // return add_site_user($this->getGUID(), $site_guid); return add_site_user($site_guid, $this->getGUID()); }
/** * Adds a user to the site. * * @param int $user_guid GUID * * @return bool */ public function addUser($user_guid) { return add_site_user($this->getGUID(), $user_guid); }
/** * Add this user to a particular site * * @param \ElggSite $site The site to add this user to. This used to be the * the site guid (still supported by deprecated) * @return bool */ public function addToSite($site) { if (is_numeric($site)) { elgg_deprecated_notice('\\ElggUser::addToSite() takes a site entity', 1.9); return add_site_user($site, $this->getGUID()); } return parent::addToSite($site); }
/** * Adds a user to the site. * * @param int $user_guid GUID * * @return bool * @deprecated 1.9 Use \ElggSite::addEntity() */ public function addUser($user_guid) { elgg_deprecated_notice('\\ElggSite::addUser() is deprecated. Use \\ElggEntity::addEntity()', 1.9); return add_site_user($this->getGUID(), $user_guid); }