本文整理汇总了PHP中UserAccount::processPost方法的典型用法代码示例。如果您正苦于以下问题:PHP UserAccount::processPost方法的具体用法?PHP UserAccount::processPost怎么用?PHP UserAccount::processPost使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserAccount
的用法示例。
在下文中一共展示了UserAccount::processPost方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: activateaccountAction
function activateaccountAction()
{
$session = SessionWrapper::getInstance();
// replace the decoded id with an undecoded value which will be used during processPost()
$id = decode($this->_getParam('id'));
$this->_setParam('id', $id);
$user = new UserAccount();
$user->populate($id);
$user->processPost($this->_getAllParams());
if ($user->hasError()) {
$session->setVar(FORM_VALUES, $this->_getAllParams());
$session->setVar(ERROR_MESSAGE, $user->getErrorStackAsString());
$this->_helper->redirector->gotoUrl(decode($this->_getParam(URL_FAILURE)));
}
$result = $user->activateAccount($this->_getParam('activationkey'));
if ($result) {
// go to sucess page
$this->_helper->redirector->gotoUrl(decode($this->_getParam(URL_SUCCESS)));
} else {
$session->setVar(FORM_VALUES, $this->_getAllParams());
$session->setVar(ERROR_MESSAGE, $user->getErrorStackAsString());
$this->_helper->redirector->gotoUrl(decode($this->_getParam(URL_FAILURE)));
}
}