忘記密碼功能

2021-07-14 05:26:12 字數 2511 閱讀 9752

/**

* 調往忘記密碼頁面

*@authorxushuanglu

*@date2023年6月21日 */

publicstring tofindpass()

/**

* 忘記密碼下一步

*@paramphone

手機號

*@paramcode

驗證碼

*@paramphonecode

手機簡訊驗證碼

*@authorxushuanglu

*@date2023年6月21日 */

model.addattribute("hjsuserscustomer",hjsuserscustomer);// 使用者資訊

returndisplay("resetpassword");

}/**

* 後台驗證

*@paramphone

手機號

*@paramcode

驗證碼

*@paramphonecode

手機簡訊驗證碼

*@authorxushuanglu

*@date2023年6月21日 */

privatestring backgroundvalidate(stringphone, stringcode, stringphonecode,

hjsuserscustomer hjsuserscustomer)

// 手機驗證碼

if(getsession().getattribute("passcode") !=null)else

}// 驗證碼

if(validateutils.isstringempty(code))

if(!getsession().getattribute(const.session_security_code

).tostring().equalsignorecase(code))

returnresult;

}/**

* 修改密碼

*@paramnewpass

新密碼

*@authorxushuanglu

*@date2023年6月21日 */

newpass =new******hash("sha-1",userscustomer.getusername(),newpass).tostring();//密碼加密

userscustomer.setpassword(newpass);

//更新密碼

userscustomerservice.update(userscustomer);

return"redirect:login";

}

mysql 密碼忘記 MySQL忘記密碼??怎麼辦

再開啟另外乙個cmd視窗,同樣是進入到mysql的bin目錄,如果已經將mysql的bin目錄配置到環境變數中,可以直接輸入mysql命令 c mysql 5.7.19 winx64 bin mysql welcome to the mysql monitor.commands end with o...

Linux忘記密碼

方法 grub啟動修改 啟動到grub時,按e鍵 進入新的選項中,選擇到 kernel boot vmlinuz 2.4.18 14 single ro root label 後,回車,在kernel boot vmlinuz 2.4.18 14 single ro root label 後輸入 空...

oracle忘記密碼

d oracle ora92 bin sqlplus nolog sql plus release 9.2.0.1.0 production on 星期四 8月 16 11 32 22 2007 sql conn as sysdba 已連線。sql alter user system identif...