Skip to content

Commit

Permalink
Just tiny bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
LordRalex committed Apr 3, 2015
1 parent 0b8c698 commit e89ef4a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions functions/panel/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public static function startResetPassword($email) {
}
$resetkey = Utilities::generate_string(64);
self::$database->prepare("UPDATE passwordreset SET resetkey = ? WHERE email = ?")->execute(array($resetkey, $email));
return $resetkey;
}

public static function submitPasswordReset($email, $key) {
Expand Down
3 changes: 2 additions & 1 deletion routes/auth/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
$response->redirect("/auth/register", 302);
return;
}
$result = User::create($request->param('email'), $request->param('email'), $request->param('password'));
$result = User::create($request->param('email'), $request->param('username'), $request->param('password'));
if (!$result['success']) {
$service->flash($result['error']);
} else {
Expand Down Expand Up @@ -115,6 +115,7 @@
if ($resetKey == null) {
$service->flash('Your reset link has been emailed to you');
$response->redirect('/auth/login', 302);
return;
}
$url = Config::getGlobal('site')['full'] . '/auth/resetpw?email=' . $request->param('email') . '&resetkey=' . $resetKey;
Email::send($request->param('email'), 'Password reset for cp.ae97.net', 'Someone requested your password to be reset. If you wanted to do this, please use <strong><a href="' . $url . '">this link</a></strong> to '
Expand Down

0 comments on commit e89ef4a

Please sign in to comment.