本文整理汇总了PHP中UsersHelperRoute::getRemindRoute方法的典型用法代码示例。如果您正苦于以下问题:PHP UsersHelperRoute::getRemindRoute方法的具体用法?PHP UsersHelperRoute::getRemindRoute怎么用?PHP UsersHelperRoute::getRemindRoute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UsersHelperRoute
的用法示例。
在下文中一共展示了UsersHelperRoute::getRemindRoute方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: remind
/**
* Method to request a username reminder.
*
* @since 1.6
*/
public function remind()
{
// Check the request token.
Session::checkToken('post') or exit(Lang::txt('JINVALID_TOKEN'));
$app = JFactory::getApplication();
$model = $this->getModel('Remind', 'UsersModel');
$data = Request::getVar('jform', array(), 'post', 'array');
// Submit the password reset request.
$return = $model->processRemindRequest($data);
// Check for a hard error.
if ($return == false) {
// The request failed.
// Get the route to the next page.
$itemid = UsersHelperRoute::getRemindRoute();
$itemid = $itemid !== null ? '&Itemid=' . $itemid : '';
$route = 'index.php?option=com_users&view=remind' . $itemid;
// Go back to the request form.
$message = Lang::txt('COM_USERS_REMIND_REQUEST_FAILED', $model->getError());
$this->setRedirect(Route::url($route, false), $message, 'warning');
return false;
} else {
// The request succeeded.
// Get the route to the next page.
$itemid = UsersHelperRoute::getRemindRoute();
$itemid = $itemid !== null ? '&Itemid=' . $itemid : '';
$route = 'index.php?option=com_users&view=login' . $itemid;
// Proceed to step two.
$message = Lang::txt('COM_USERS_REMIND_REQUEST_SUCCESS');
$this->setRedirect(Route::url($route, false), $message);
return true;
}
}
示例2: remind
/**
* Method to request a username reminder.
*
* @return boolean
*
* @since 1.6
*/
public function remind()
{
// Check the request token.
JSession::checkToken('post') or jexit(JText::_('JINVALID_TOKEN'));
$model = $this->getModel('Remind', 'UsersModel');
$data = $this->input->post->get('jform', array(), 'array');
// Submit the password reset request.
$return = $model->processRemindRequest($data);
// Check for a hard error.
if ($return == false) {
// The request failed.
// Get the route to the next page.
$itemid = UsersHelperRoute::getRemindRoute();
$itemid = $itemid !== null ? '&Itemid=' . $itemid : '';
$route = 'index.php?option=com_users&view=remind' . $itemid;
// Go back to the request form.
$message = JText::sprintf('Request failed: Your account is not activated yet or is under review. Please contact the admin more for details.', $model->getError());
$this->setRedirect(JRoute::_($route, false), $message, 'notice');
return false;
} else {
// The request succeeded.
// Get the route to the next page.
$itemid = UsersHelperRoute::getRemindRoute();
$itemid = $itemid !== null ? '&Itemid=' . $itemid : '';
$route = 'index.php?option=com_users&view=login' . $itemid;
// Proceed to step two.
$message = JText::_('COM_USERS_REMIND_REQUEST_SUCCESS');
$this->setRedirect(JRoute::_($route, false), $message);
return true;
}
}
示例3: getLogin
public static function getLogin($params)
{
$login = new stdClass();
$login->passwordFieldName = 'password';
$login->resetLink = JRoute::_('index.php?option=com_users&view=reset&Itemid=' . UsersHelperRoute::getResetRoute());
$login->remindLink = JRoute::_('index.php?option=com_users&view=remind&Itemid=' . UsersHelperRoute::getRemindRoute());
$login->registrationLink = JRoute::_('index.php?option=com_users&view=registration&Itemid=' . UsersHelperRoute::getRegistrationRoute());
$login->option = 'com_users';
$login->task = 'user.login';
$login->allowRegistration = JComponentHelper::getParams('com_users')->get('allowUserRegistration');
$login->return = self::getReturnURL($params, 'login');
return $login;
}
示例4:
<li>
<a href="<?php
echo JRoute::_('index.php?option=com_users&view=registration&Itemid=' . UsersHelperRoute::getRegistrationRoute());
?>
">
<?php
echo JText::_('MOD_LOGIN_REGISTER');
?>
<span class="icon-arrow-right"></span></a>
</li>
<?php
}
?>
<li>
<a href="<?php
echo JRoute::_('index.php?option=com_users&view=remind&Itemid=' . UsersHelperRoute::getRemindRoute());
?>
">
<?php
echo JText::_('MOD_LOGIN_FORGOT_YOUR_USERNAME');
?>
</a>
</li>
<li>
<a href="<?php
echo JRoute::_('index.php?option=com_users&view=reset&Itemid=' . UsersHelperRoute::getResetRoute());
?>
">
<?php
echo JText::_('MOD_LOGIN_FORGOT_YOUR_PASSWORD');
?>
示例5: remind
/**
* Method to login a user.
*
* @access public
* @since 1.0
*/
function remind()
{
// Check the request token.
JRequest::checkToken('post') or jexit(JText::_('JInvalid_Token'));
$app =& JFactory::getApplication();
$model =& $this->getModel('User', 'UsersModel');
$data = JRequest::getVar('jform', array(), 'post', 'array');
// Submit the username remind request.
$return = $model->processRemindRequest($data);
// Check for a hard error.
if (JError::isError($return)) {
// Get the error message to display.
if ($app->getCfg('error_reporting')) {
$message = $return->getMessage();
} else {
$message = JText::_('USERS_REMIND_REQUEST_ERROR');
}
// Get the route to the next page.
$itemid = UsersHelperRoute::getRemindRoute();
$itemid = $itemid !== null ? '&Itemid=' . $itemid : '';
$route = 'index.php?option=com_users&view=remind' . $itemid;
// Go back to the complete form.
$this->setRedirect(JRoute::_($route, false), $message, 'error');
return false;
} elseif ($return === false) {
// Get the route to the next page.
$itemid = UsersHelperRoute::getRemindRoute();
$itemid = $itemid !== null ? '&Itemid=' . $itemid : '';
$route = 'index.php?option=com_users&view=remind' . $itemid;
// Go back to the complete form.
$message = JText::sprintf('USERS_REMIND_REQUEST_FAILED', $model->getError());
$this->setRedirect(JRoute::_($route, false), $message, 'notice');
return false;
} else {
// Get the route to the next page.
$itemid = UsersHelperRoute::getLoginRoute();
$itemid = $itemid !== null ? '&Itemid=' . $itemid : '';
$route = 'index.php?option=com_users&view=login' . $itemid;
// Proceed to the login form.
$message = JText::_('USERS_REMIND_REQUEST_SUCCESS');
$this->setRedirect(JRoute::_($route, false), $message);
return true;
}
}
示例6: remind
/**
* Method to login a user.
*
* @return boolean
*
* @since 1.6
*/
public function remind()
{
// Check the request token.
JSession::checkToken('post') or jexit(JText::_('JINVALID_TOKEN'));
$app = JFactory::getApplication();
$model = $this->getModel('User', 'UsersModel');
$data = $this->input->post->get('jform', array(), 'array');
// Submit the username remind request.
$return = $model->processRemindRequest($data);
// Check for a hard error.
if ($return instanceof Exception) {
// Get the error message to display.
$message = $app->get('error_reporting') ? $return->getMessage() : JText::_('COM_USERS_REMIND_REQUEST_ERROR');
// Get the route to the next page.
$itemid = UsersHelperRoute::getRemindRoute();
$itemid = $itemid !== null ? '&Itemid=' . $itemid : '';
$route = 'index.php?option=com_users&view=remind' . $itemid;
// Go back to the complete form.
$this->setRedirect(JRoute::_($route, false), $message, 'error');
return false;
}
if ($return === false) {
// Complete failed.
// Get the route to the next page.
$itemid = UsersHelperRoute::getRemindRoute();
$itemid = $itemid !== null ? '&Itemid=' . $itemid : '';
$route = 'index.php?option=com_users&view=remind' . $itemid;
// Go back to the complete form.
$message = JText::sprintf('COM_USERS_REMIND_REQUEST_FAILED', $model->getError());
$this->setRedirect(JRoute::_($route, false), $message, 'notice');
return false;
}
// Complete succeeded.
// Get the route to the next page.
$itemid = UsersHelperRoute::getLoginRoute();
$itemid = $itemid !== null ? '&Itemid=' . $itemid : '';
$route = 'index.php?option=com_users&view=login' . $itemid;
// Proceed to the login form.
$message = JText::_('COM_USERS_REMIND_REQUEST_SUCCESS');
$this->setRedirect(JRoute::_($route, false), $message);
return true;
}
示例7: getRemindURL
/**
* @return string
*/
public function getRemindURL()
{
$Itemid = UsersHelperRoute::getRemindRoute();
return JRoute::_('index.php?option=com_users&view=remind' . ($Itemid ? "&Itemid={$Itemid}" : ''));
}
示例8: remind
/**
* Method to login a user.
*
* @since 1.6
*/
public function remind()
{
// Check the request token.
Session::checkToken('post');
$model = $this->getModel('User', 'UsersModel');
$data = Request::getVar('jform', array(), 'post', 'array');
// Submit the username remind request.
$return = $model->processRemindRequest($data);
// Check for a hard error.
if ($return instanceof Exception) {
// Get the error message to display.
if (Config::get('error_reporting')) {
$message = $return->getMessage();
} else {
$message = Lang::txt('COM_USERS_REMIND_REQUEST_ERROR');
}
// Get the route to the next page.
$itemid = UsersHelperRoute::getRemindRoute();
$itemid = $itemid !== null ? '&Itemid=' . $itemid : '';
$route = 'index.php?option=com_users&view=remind' . $itemid;
// Go back to the complete form.
$this->setRedirect(Route::url($route, false), $message, 'error');
return false;
} elseif ($return === false) {
// Complete failed.
// Get the route to the next page.
$itemid = UsersHelperRoute::getRemindRoute();
$itemid = $itemid !== null ? '&Itemid=' . $itemid : '';
$route = 'index.php?option=com_users&view=remind' . $itemid;
// Go back to the complete form.
$message = Lang::txt('COM_USERS_REMIND_REQUEST_FAILED', $model->getError());
$this->setRedirect(Route::url($route, false), $message, 'notice');
return false;
} else {
// Complete succeeded.
// Get the route to the next page.
$itemid = UsersHelperRoute::getLoginRoute();
$itemid = $itemid !== null ? '&Itemid=' . $itemid : '';
$route = 'index.php?option=com_users&view=login' . $itemid;
// Proceed to the login form.
$message = Lang::txt('COM_USERS_REMIND_REQUEST_SUCCESS');
$this->setRedirect(Route::url($route, false), $message);
return true;
}
}
示例9:
$langScript = '
var JLanguage = {};
JLanguage.WHAT_IS_OPENID = \'' . JText::_('K2_WHAT_IS_OPENID') . '\';
JLanguage.LOGIN_WITH_OPENID = \'' . JText::_('K2_LOGIN_WITH_OPENID') . '\';
JLanguage.NORMAL_LOGIN = \'' . JText::_('K2_NORMAL_LOGIN') . '\';
var modlogin = 1;
';
$document = JFactory::getDocument();
$document->addScriptDeclaration($langScript);
JHTML::_('script', 'openid.js');
}
// Get user stuff (do not edit)
$usersConfig = JComponentHelper::getParams('com_users');
// Define some variables depending on Joomla! version
$passwordFieldName = K2_JVERSION != '15' ? 'password' : 'passwd';
$resetLink = JRoute::_(K2_JVERSION != '15' ? 'index.php?option=com_users&view=reset&Itemid=' . UsersHelperRoute::getResetRoute() : 'index.php?option=com_user&view=reset');
$remindLink = JRoute::_(K2_JVERSION != '15' ? 'index.php?option=com_users&view=remind&Itemid=' . UsersHelperRoute::getRemindRoute() : 'index.php?option=com_user&view=remind');
$registrationLink = JRoute::_(K2_JVERSION != '15' ? 'index.php?option=com_users&view=registration&Itemid=' . UsersHelperRoute::getRegistrationRoute() : 'index.php?option=com_user&view=register');
$option = K2_JVERSION != '15' ? 'com_users' : 'com_user';
$task = K2_JVERSION != '15' ? 'user.login' : 'login';
require JModuleHelper::getLayoutPath('mod_k2_user', 'login');
} else {
JHTML::_('behavior.modal');
$user->profile = modK2UserHelper::getProfile($params);
$user->numOfComments = modK2UserHelper::countUserComments($user->id);
$menu = modK2UserHelper::getMenu($params);
$profileLink = JRoute::_(K2_JVERSION != '15' ? 'index.php?option=com_users&view=profile&layout=edit&Itemid=' . UsersHelperRoute::getProfileRoute() : 'index.php?option=com_user&view=user&task=edit');
$option = K2_JVERSION != '15' ? 'com_users' : 'com_user';
$task = K2_JVERSION != '15' ? 'user.logout' : 'logout';
require JModuleHelper::getLayoutPath('mod_k2_user', 'userblock');
}
示例10: if
</div>
<?php endif; ?>
</form>
</div>
<?php if ($usersConfig->get('allowUserRegistration')) : ?>
<div class="mdl-card__actions mdl-card--border">
<a class="mdl-button mdl-button--colored mdl-js-button mdl-js-ripple-effect" href="<?php echo JRoute::_('index.php?option=com_users&view=registration&Itemid=' . UsersHelperRoute::getRegistrationRoute()); ?>">
<?php echo JText::_('MOD_LOGIN_REGISTER'); ?> <span class="icon-arrow-right"></span></a>
<div class="mdl-layout-spacer"></div>
<i class="material-icons">event</i>
</div>
<?php endif; ?>
<div class="mdl-card__actions mdl-card--border">
<a class="mdl-button mdl-button--colored mdl-js-button mdl-js-ripple-effect" href="<?php echo JRoute::_('index.php?option=com_users&view=remind&Itemid=' . UsersHelperRoute::getRemindRoute()); ?>">
<?php echo JText::_('MOD_LOGIN_FORGOT_YOUR_USERNAME'); ?></a>
<div class="mdl-layout-spacer"></div>
<i class="material-icons">event</i>
</div>
<div class="mdl-card__actions mdl-card--border">
<a href="<?php echo JRoute::_('index.php?option=com_users&view=reset&Itemid=' . UsersHelperRoute::getResetRoute()); ?>">
<?php echo JText::_('MOD_LOGIN_FORGOT_YOUR_PASSWORD'); ?></a>
<div class="mdl-layout-spacer"></div>
<i class="material-icons">event</i>
</div>
</div>