密码找回提示:用户名不存在,你无法重设密码 的解决方法
在NT2.0中,使用论坛提供的找回密码功能,通过邮箱重设密码连接中的连接地址进入重设密码的页面,输入新密码后提示:“用户名不存在,你无法重设密码 的解决方法”。经过努力总算发现了问题所在,现提供给大家
主要原因为 不完整的表单使参数传递错误
修改模板文件 templates\setnewpassword.htm 文件如下
<%template _header%>
<!--TheCurrent start-->
<div id="foruminfo">
<div class="userinfo">
<h2><a href="{config.forumurl}">{config.forumtitle}</a><strong>密码重置</strong></h2>
</div>
</div>
<!--TheCurrent end-->
<%if {ispost}%>
<%if page_err==0%>
<%template _msgbox%>
<%else%>
<%template _errmsgbox%>
<%/if%>
<%else%>
<%if page_err==0%>
<form id="form1" name="form1" method="post" action="#">
<div class="ntforumbox">
<div class="titlebar">
<h3>密码重置</h3>
</div>
<table cellpadding="0" cellspacing="0" border="0">
<tbody>
<tr class="list">
<th class="formlabel">新密码:</th>
<td class="formbody"><input name="newpassword" type="password" id="newpassword" size="25" class="colorblue" />
<input name="uid" type="hidden" id="uid" value="{request[uid]}" />
<input name="authstr" type="hidden" id="authstr" value="{request[id]}" />
</td>
</tr>
</tbody>
<tbody>
<tr class="list">
<th class="formlabel">确认密码:</th>
<td class="formbody"><input name="confirmpassword" type="password" id="confirmpassword" size="25" class="colorblue" >
</td>
</tr>
</tbody>
<%if {isseccode}%>
<tbody>
<tr class="list">
<th class="formlabel">验证码:</th>
<td class="formbody"><%template _vcode%></td>
</tr>
</tbody>
<%/if%>
<tbody>
<tr class="list">
<th class="formlabel"> </th>
<td class="formbody">
<input name="login" type="submit" id="login" value="确定" class="sbutton" />
<input name="cancel" type="button" id="cancel" value="取消" class="sbutton" />
</td>
</tr>
</tbody>
</table>
</div>
</form>
</div>
<%template _copyright%>
<%else%>
<%template _errmsgbox%>
</div>
<%/if%>
<%/if%>
<%template _footer%>