本文整理匯總了PHP中MemberModel::modify_member_pass方法的典型用法代碼示例。如果您正苦於以下問題:PHP MemberModel::modify_member_pass方法的具體用法?PHP MemberModel::modify_member_pass怎麽用?PHP MemberModel::modify_member_pass使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類MemberModel
的用法示例。
在下文中一共展示了MemberModel::modify_member_pass方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: screen_modify_pass
public function screen_modify_pass()
{
$this->make_member_modify_pass_form();
$btn1 = "";
$btn2 = "";
if (!$this->form->validate()) {
$this->action = "form";
}
if ($this->action == "form") {
$this->file = "member_modify_pass.tpl";
$this->title = "パスワード・変更ページ";
$this->next_type = "modify_pass";
$this->next_action = "complete";
$btn1 = "変更";
$btn2 = "";
} else {
if ($this->action == "complete" && isset($_POST['submit1']) && $_POST['submit1'] == "変更") {
$data = $this->form->getSubmitValues();
if (!$this->auth->check_pass($_SESSION[_MEMBER_AUTHINFO]['password'], $data['password_old'])) {
$this->file = "member_modify_pass.tpl";
$this->title = "パスワード・変更ページ";
$this->message = "現在のパスワードが間違っています。<br>もう一度、間違えると元のページに戻ります!!";
$this->type = "modify_pass";
$this->action = "complete";
$btn1 = "変更";
$btn2 = "";
} else {
$MemberModel = new MemberModel();
$data[] = "";
$data['password'] = $this->auth->get_hash_password($data['password_new1']);
$data['id'] = $_SESSION[_MEMBER_AUTHINFO]['id'];
$MemberModel->modify_member_pass($data);
$_SESSION[_MEMBER_AUTHINFO]['password'] = $data['password'];
$this->file = "message.tpl";
$this->title = "パスワードの変更が完了しました";
$this->message = "下記よりトップページに戻ってください";
}
}
}
$this->form->addElement('submit', 'submit1', $btn1);
$this->form->addElement('submit', 'submit2', $btn2);
$this->form->addElement('reset', 'reset', '取り消し');
$this->view_display();
}