本文整理汇总了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();
}