protected function compile() { global $objPage; $this->Controller = new MemberPlus($this->objModel); $this->Template->members = ''; // Get the member item $objMember = MemberPlusMemberModel::findActiveByParentAndIdOrAlias(\Input::get('items'), $this->mlGroups); if ($objMember === null) { // Do not index or cache the page $objPage->noSearch = 1; $objPage->cache = 0; // Send a 404 header header('HTTP/1.1 404 Not Found'); $this->Template->members = '<p class="error">' . sprintf($GLOBALS['TL_LANG']['MSC']['invalidPage'], \Input::get('items')) . '</p>'; return; } $strMember = $this->Controller->parseMember($objMember); $this->Template->members = $strMember; $strCombinedTitle = $this->Controller->getCombinedTitle($objMember); // Overwrite the page title (see #2853 and #4955) if ($strCombinedTitle != '') { $objPage->pageTitle = strip_tags(strip_insert_tags($strCombinedTitle)); } // Overwrite the page description // if ($objArticle->teaser != '') // { // $objPage->description = $this->prepareMetaDescription($objArticle->teaser); // } }
protected function compile() { $this->Controller = new MemberPlus($this->objModel); $this->objMembers = MemberPlusMemberModel::findActiveByIds($this->mlSort); if ($this->objMembers === null) { $this->Template->empty = $GLOBALS['TL_LANG']['MSC']['emptyMemberlist']; return; } $arrMembers = array(); while ($this->objMembers->next()) { $arrMembers[$this->objMembers->id] = $this->Controller->parseMember($this->objMembers->current()); } $this->Template->members = $arrMembers; }
protected function registerUser($username) { if (utf8_strlen(\Input::post('password')) < \Config::get('minPasswordLength')) { $_SESSION['LOGIN_ERROR'] = sprintf($GLOBALS['TL_LANG']['ERR']['passwordLength'], \Config::get('minPasswordLength')); return; } $arrData = array('username' => $username, 'password' => \Encryption::hash(\Input::post('password')), 'email' => $username); // clean up previous registrations if (($objMember = MemberPlusMemberModel::findInactiveByUsername($username)) !== null) { $objMember->delete(); } // user with this username already exists if (($objMember = MemberPlusMemberModel::findBy('username', $username)) !== null) { $_SESSION['LOGIN_ERROR'] = $GLOBALS['TL_LANG']['MSC']['usernameTaken']; return; } $_SESSION['LOGIN_INFO'] = sprintf($GLOBALS['TL_LANG']['MSC']['activationEmailSent'], $username); $this->createNewUser($arrData); }