public function __construct() { parent::__construct(); if (!UserCore::auth() && $this->registry->controller !== 'AdminController') { $this->signUpRedirect(); } if (!AdminCore::auth() && $this->registry->controller === 'AdminController') { // For security reasons, we do not redirectionnons the user to hide the url of the administrative part. Framework\Url\Header::redirect(Framework\Mvc\Router\Uri::get('payment', 'main', 'index'), $this->adminSignInMsg(), 'error'); } }
public function __construct() { parent::__construct(); // This module is available only to members if (!UserCore::auth() && !AdminCore::auth()) { $this->signInRedirect(); } if (!AdminCore::auth() && $this->registry->controller === 'AdminController') { // For security reasons, we do not redirectionnons the user to hide the url of the administrative part. Framework\Url\Header::redirect(Framework\Mvc\Router\Uri::get('user', 'main', 'login'), $this->adminSignInMsg(), 'error'); } }
public function __construct() { parent::__construct(); $bAdminAuth = AdminCore::auth(); if (!$bAdminAuth) { if (!$this->checkMembership() || !$this->group->games_access) { $this->paymentRedirect(); } } if (!$bAdminAuth && $this->registry->controller === 'AdminController') { // For security reasons, we do not redirectionnons the user to hide the url of the administrative part. Framework\Url\HeaderUrl::redirect(Framework\Mvc\Router\Uri::get('game', 'main', 'index'), $this->adminSignInMsg(), 'error'); } }
public function __construct() { parent::__construct(); $bAdminAuth = AdminCore::auth(); if (!UserCore::auth() && !$bAdminAuth) { $this->signInRedirect(); } if (!$bAdminAuth) { if (!$this->checkMembership() || $this->registry->action === 'inbox' && !$this->group->read_mails) { $this->paymentRedirect(); } elseif ($this->registry->action === 'compose' && !$this->group->send_mails) { $this->paymentRedirect(); } } if (!$bAdminAuth && $this->registry->controller === 'AdminController') { // For security reasons, we do not redirectionnons the user to hide the url of the administrative part. Framework\Url\Header::redirect(Framework\Mvc\Router\Uri::get('user', 'main', 'login'), $this->adminSignInMsg(), 'error'); } }
public function __construct() { parent::__construct(); // Level for Notes $bAdminAuth = AdminCore::auth(); if (!UserCore::auth() && ($this->registry->action === 'add' || $this->registry->action === 'edit' || $this->registry->action === 'delete')) { $this->signUpRedirect(); } if (!$bAdminAuth) { if (!$this->checkMembership() || $this->registry->action === 'read' && !$this->group->read_notes) { $this->paymentRedirect(); } elseif ($this->registry->action === 'add' && !$this->group->write_notes) { $this->paymentRedirect(); } } if (!$bAdminAuth && $this->registry->controller === 'AdminController') { // For security reasons, we do not redirectionnons the user to hide the url of the administrative part. Framework\Url\Header::redirect(Framework\Mvc\Router\Uri::get('blog', 'main', 'index'), $this->adminSignInMsg(), 'error'); } }
public function __construct() { parent::__construct(); /***** Levels for the forums *****/ $bAdminAuth = AdminCore::auth(); if (!UserCore::auth() && !$bAdminAuth && ($this->registry->action === 'addtopic' || $this->registry->action === 'edittopic' || $this->registry->action === 'deletetopic' || $this->registry->action === 'reply' || $this->registry->action === 'editmessage' || $this->registry->action === 'deletemessage')) { $this->signInRedirect(); } if (!$bAdminAuth) { if (!$this->checkMembership() || !$this->group->forum_access) { $this->paymentRedirect(); } elseif ($this->registry->action === 'addtopic' && !$this->group->create_forum_topics) { $this->paymentRedirect(); } elseif ($this->registry->action === 'reply' && !$this->group->answer_forum_topics) { $this->paymentRedirect(); } } if (!$bAdminAuth && $this->registry->controller === 'AdminController') { // For security reasons, we do not redirectionnons the user to hide the url of the administrative part. Framework\Url\Header::redirect(Framework\Mvc\Router\Uri::get('forum', 'forum', 'index'), $this->adminSignInMsg(), 'error'); } }
public function index() { Framework\Url\HeaderUrl::redirect(Framework\Mvc\Router\Uri::get(PH7_ADMIN_MOD, 'file', 'display')); }
public function index() { Framework\Url\Header::redirect(Framework\Mvc\Router\Uri::get('user', 'search', 'quick')); }
/** * Send an email to warn the friend request. * * @param int $iId friend ID * @param object \PH7\UserCoreModel $oUserModel * @return void */ protected function sendMail($iId, UserCoreModel $oUserModel) { $sFriendEmail = $oUserModel->getEmail($iId); $sFriendUsername = $oUserModel->getUsername($iId); /** * Note: The predefined variables as %site_name% does not work here, * because we are in an ajax script that is called before the definition of these variables. */ /** * Get the site name, because we do not have access to predefined variables. */ $sSiteName = Framework\Mvc\Model\DbConfig::getSetting('siteName'); $this->view->content = t('Hello %0%!<br /><strong>%1%</strong> sent you a friendship request on %2%.<br /> <a href="%3%">Click here</a> to see your friend request.', $sFriendUsername, $this->session->get('member_username'), $sSiteName, Framework\Mvc\Router\Uri::get('user', 'friend', 'index')); /* Because we work in Ajax, the constant "PH7_TPL_NAME" is not yet defined. * So we use the constant "PH7_DEFAULT_THEME" is already defined. */ $sMessageHtml = $this->view->parseMail(PH7_PATH_SYS . 'global/' . PH7_VIEWS . PH7_DEFAULT_THEME . '/mail/sys/mod/user/friend_request.tpl', $sFriendEmail); $aInfo = ['to' => $sFriendEmail, 'subject' => t('%0% wants to be friends with you on %1%', $this->session->get('member_first_name'), $sSiteName)]; (new Framework\Mail\Mail())->send($aInfo, $sMessageHtml); }
public function index() { Framework\Url\Header::redirect(Framework\Mvc\Router\Uri::get(PH7_ADMIN_MOD, 'account', 'edit')); }
public function index() { Framework\Url\Header::redirect(Framework\Mvc\Router\Uri::get('mail', 'admin', 'msglist')); }
public function index() { Framework\Url\Header::redirect(Framework\Mvc\Router\Uri::get(PH7_ADMIN_MOD, 'info', 'software')); }