去除前台用户登录验证码
1.修改lib/default/user_act.php 注释掉或删除55-58行
修改为
- //if(!session::get('verify') || front::post('verify')<>session::get('verify')) {
- //front::flash('验证码错误!');
- //return;
- //}
复制代码
2.修改template/default/user/login.html 注释掉或删除或删除26-30行 89-96行
- if(document.loginform.verify.value.length==0){
- alert("请输入验证码!");
- document.loginform.verify.focus();
- return false;
- }
复制代码
- <tr>
- <td style="height: 30px" align="right">
- 验证码:
- </td>
- <td style="height: 30px">
- <input type='text' id="verify" tabindex="3" name="verify" class="input" style="width:100px;" /> {verify()}
- </td>
- </tr>
复制代码
3.修改template/default/user/login_js.html 注释掉或删除21行
- <div style="float:right;width:50px;"><input type='text' id="verify" class="login_input" style="width:50px;" name="verify" tabindex="3" /></div><div style="float:left;width:112px;"><span style="float:left;">验证码: </span><span style="float:left;">{verify()}</span></div>
复制代码
去除后台用户登录验证码
1.修改lib/admin/admin_act.php 注释掉或删除25-29行
- // if(!session::get('verify') || front::post('verify')<>session::get('verify')) {
- // front::flash('验证码错误!');
- // $this->render();
- // exit;
- // }
复制代码
2.修改template/admin/admin/login.php 注释掉或删除68-74行
- <tr>
- <td style="height: 30px" align="right">
- 验证码:
- </td>
- <td style="height: 30px">
- <input type='text' id="verify" tabindex="3" name="verify" class="input" style="width:100px;" /> {verify()}
- </td>
- </tr>
复制代码
操作完成后,请清空 cache文件夹内文件,然后刷新页面,查看结果