接着前面的第一篇,往下面写,这个是国内外多语言版盲盒网站系统开发建设 第二篇,直接进入正题了。
退出登录
public function logout()
{
//退出本站
$this->auth->logout();
$this->success(__('Logout successful'), url('user/index'));
}
/**
* 个人信息
*/
public function profile()
{
$this->view->assign('title', __('Profile'));
return $this->view->fetch();
}
修改密码
public function changepwd()
{
if ($this->request->isPost()) {
$oldpassword = $this->request->post("oldpassword");
$newpassword = $this->request->post("newpassword");
$renewpassword = $this->request->post("renewpassword");
$token = $this->request->post('__token__');
$rule = [
'oldpassword' => 'require|length:6,30',
'newpassword' => 'require|length:6,30',
'renewpassword' => 'require|length:6,30|confirm:newpassword',
'__token__' => 'token',
];
$msg = [
'renewpassword.confirm' => __('Password and confirm password don\'t match')
];