mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-03-10 06:03:17 +00:00
Merge pull request #462 from pixelfed/frontend-ui-refactor
Update AccountController, fix #456
This commit is contained in:
commit
e16ab42682
2 changed files with 7 additions and 2 deletions
|
@ -295,7 +295,10 @@ class AccountController extends Controller
|
||||||
if(password_verify($password, $user->password) === true) {
|
if(password_verify($password, $user->password) === true) {
|
||||||
$request->session()->put('sudoMode', time());
|
$request->session()->put('sudoMode', time());
|
||||||
return redirect($next);
|
return redirect($next);
|
||||||
|
} else {
|
||||||
|
return redirect()
|
||||||
|
->back()
|
||||||
|
->withErrors(['password' => __('auth.failed')]);
|
||||||
}
|
}
|
||||||
return redirect($next);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,9 @@ class User extends Authenticatable
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $hidden = [
|
protected $hidden = [
|
||||||
'password', 'remember_token',
|
'email', 'password', 'is_admin', 'remember_token',
|
||||||
|
'email_verified_at', '2fa_enabled', '2fa_secret',
|
||||||
|
'2fa_backup_codes', '2fa_setup_at',
|
||||||
];
|
];
|
||||||
|
|
||||||
public function profile()
|
public function profile()
|
||||||
|
|
Loading…
Add table
Reference in a new issue