本文整理汇总了PHP中ca_users::setErrorOutput方法的典型用法代码示例。如果您正苦于以下问题:PHP ca_users::setErrorOutput方法的具体用法?PHP ca_users::setErrorOutput怎么用?PHP ca_users::setErrorOutput使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ca_users
的用法示例。
在下文中一共展示了ca_users::setErrorOutput方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: resetSend
function resetSend()
{
MetaTagManager::setWindowTitle($this->request->config->get("app_display_name") . ": " . _t("Reset Password"));
$t_user = new ca_users();
$vs_message = "";
$va_errors = array();
$ps_email = $this->request->getParameter('reset_email', pString);
if (!caCheckEmailAddress($ps_email)) {
$this->view->setVar("message", _t("E-mail address is not valid"));
$this->resetForm();
} else {
$t_user->setErrorOutput(0);
if (!$t_user->load(array("user_name" => $ps_email))) {
$t_user->load(array("email" => $ps_email));
}
# verify user exists with this e-mail address
if ($t_user->getPrimaryKey()) {
# user with e-mail does exists...
if (sizeof($va_errors) == 0) {
$o_view = new View($this->request, array($this->request->getViewsDirectoryPath()));
$vs_reset_key = md5($t_user->get("user_id") . '/' . $t_user->get("password"));
# --- get the subject of the email from template
$vs_subject_line = $o_view->render('mailTemplates/instructions_subject.tpl');
# -- generate mail text from template - get both the text and html versions
$vs_password_reset_url = $this->request->config->get("site_host") . caNavUrl($this->request, '', 'LoginReg', 'resetSave', array('key' => $vs_reset_key));
$o_view->setVar("password_reset_url", $vs_password_reset_url);
$vs_mail_message_text = $o_view->render('mailTemplates/instructions.tpl');
$vs_mail_message_html = $o_view->render('mailTemplates/instructions_html.tpl');
caSendmail($t_user->get('email'), $this->request->config->get("ca_admin_email"), $vs_subject_line, $vs_mail_message_text, $vs_mail_message_html);
$this->view->setVar("email", $this->request->config->get("ca_admin_email"));
$this->view->setVar("action", "send");
$this->render('LoginReg/form_reset_html.php');
}
} else {
$this->view->setVar("message", _t("There is no registered user with the email address you provided"));
$this->resetForm();
}
}
}