Use dirape/token to generate tokens and passwords for users

This commit is contained in:
DariusIII
2018-09-19 11:37:07 +02:00
parent 28e444f7b7
commit f99c3ae6c0
7 changed files with 99 additions and 97 deletions
@@ -35,6 +35,11 @@ class ForgotPasswordController extends Controller
$this->middleware('guest');
}
/**
* @param \Illuminate\Http\Request $request
*
* @throws \Exception
*/
public function showLinkRequestForm(Request $request)
{
$sent = '';
@@ -59,7 +64,7 @@ class ForgotPasswordController extends Controller
//
// Generate a forgottenpassword guid, store it in the user table
//
$guid = md5(uniqid('', false));
$guid = \Token::random(32);
User::updatePassResetGuid($ret['id'], $guid);
//
// Send the email