注销登录和修改

账号的注销和修改密码

账号的注销,只需要我们清空session就可以了,我们来编写登录控制器。

控制器.png

公用头部文件修改路径

退出登录.png

QQ截图20170622160950.png

获取用户名称显示。

QQ截图20170622160959.png

修改密码的路径。同时发送当前用户的id。

我们的这一节就全部完成了。

继续学习
||
<div class="navbar"> <div class="navbar-inner"> <div class="navbar-container"> <!-- Navbar Barnd --> <div class="navbar-header pull-left"> <a href="#" class="navbar-brand"> <small> <img src="__PUBLIC__/images/logo.png" alt=""> </small> </a> </div> <!-- /Navbar Barnd --> <!-- Sidebar Collapse --> <div class="sidebar-collapse" id="sidebar-collapse"> <i class="collapse-icon fa fa-bars"></i> </div> <!-- /Sidebar Collapse --> <!-- Account Area and Settings --> <div class="navbar-header pull-right"> <div class="navbar-account"> <ul class="account-area"> <li> <a class="login-area dropdown-toggle" data-toggle="dropdown"> <div class="avatar" title="View your public profile"> <img src=""> </div> <section> <h2><span class="profile"><span>{$Think.session.username}</span></span></h2> </section> </a> <!--Login Area Dropdown--> <ul class="pull-right dropdown-menu dropdown-arrow dropdown-login-area"> <li class="username"><a>David Stevenson</a></li> <li class="dropdown-footer"> <a href="__MODULE__/Admin/logout"> 退出登录 </a> </li> <li class="dropdown-footer"> <a href="__MODULE__/Admin/edit/id/{$Think.session.uid}"> 修改密码 </a> </li> </ul> <!--/Login Area Dropdown--> </li> <!-- /Account Area --> <!--Note: notice that setting div must start right after account area list. no space must be between these elements--> <!-- Settings --> </ul> </div> </div> <!-- /Account Area and Settings --> </div> </div> </div>
提交重置代码