/** * Tag the entry * * @param string $tags Tags to apply * @param integer $user_id ID of tagger * @param integer $admin Tag as admin? 0=no, 1=yes * @return boolean */ public function tag($tags = null, $user_id = 0, $admin = 0) { $cloud = new Tags($this->get('id')); return $cloud->setTags($tags, $user_id, $admin); }
/** * Short description for 'loadProfile' * * Long description (if any) ... * * @param object $xprofile Parameter description (if any) ... * @return unknown Return description (if any) ... */ public function loadProfile($xprofile = null) { $this->clear(); if (!is_object($xprofile)) { return; } //get user tags require_once dirname(__DIR__) . DS . 'models' . DS . 'tags.php'; $database = \App::get('db'); $mt = new Tags($xprofile->get('uidNumber')); $tag_string = $mt->render('string'); //get member addresses require_once dirname(__DIR__) . DS . 'tables' . DS . 'address.php'; $membersAddress = new Tables\Address($database); $addresses = $membersAddress->getAddressesForMember($xprofile->get("uidNumber")); $this->set('countryresident', $xprofile->get('countryresident')); $this->set('countryorigin', $xprofile->get('countryorigin')); $this->set('nativetribe', $xprofile->get('nativeTribe')); $this->set('role', $xprofile->get('role')); $this->set('edulevel', $xprofile->get('edulevel')); $this->set('hispanic', $xprofile->get('hispanic')); $this->set('disability', $xprofile->get('disability')); $this->set('race', $xprofile->get('race')); $this->set('login', $xprofile->get('username')); $this->set('email', $xprofile->get('email')); $this->set('confirmEmail', $xprofile->get('email')); $this->set('web', $xprofile->get('url')); $this->set('phone', $xprofile->get('phone')); $this->set('name', $xprofile->get('name')); $this->set('givenName', $xprofile->get('givenName')); $this->set('middleName', $xprofile->get('middleName')); $this->set('surname', $xprofile->get('surname')); $this->set('orgtype', $xprofile->get('orgtype')); $this->set('org', $xprofile->get('organization')); $this->set('orgtext', ''); $this->set('reason', $xprofile->get('reason')); $this->set('reasontxt', ''); $this->set('password', null); $this->set('confirmPassword', null); $this->set('sex', $xprofile->get('gender')); $this->set('usageAgreement', $xprofile->get('usageAgreement')); $this->set('mailPreferenceOption', $xprofile->get('mailPreferenceOption')); $this->set('interests', $tag_string); $this->set('address', $addresses); $this->set('orcid', $xprofile->get('orcid')); $this->_checked = false; }