Use username instead of email address in password reset (#6382)

* Switch to use username instead of email

* Fixed indenting

* Updated password language

* Updated blades to reflect username instead of email

* Changed password/reset controllers to use username instead of email

* Redirect to login page instead of repeating the password reset form
This commit is contained in:
snipe
2018-10-31 18:03:24 -07:00
committed by GitHub
parent ce8d47b2b4
commit ea91d59ffc
6 changed files with 60 additions and 44 deletions
+9 -13
View File
@@ -19,19 +19,15 @@ return array(
'success' => 'Account sucessfully created.',
),
'forgot-password' => array(
'error' => 'There was a problem while trying to get a reset password code, please try again.',
'success' => 'Password recovery email successfully sent.',
),
'forgot-password-confirm' => array(
'error' => 'There was a problem while trying to reset your password, please try again.',
'success' => 'Your password has been successfully reset.',
),
'activate' => array(
'error' => 'There was a problem while trying to activate your account, please try again.',
'success' => 'Your account has been successfully activated.',
'forgot-password' => array(
'error' => 'There was a problem while trying to get a reset password code, please try again.',
'success' => 'Password recovery email successfully sent.',
),
'forgot-password-confirm' => array(
'error' => 'There was a problem while trying to reset your password, please try again.',
'success' => 'Your password has been successfully reset.',
),
);
+2 -2
View File
@@ -1,7 +1,7 @@
<?php
return [
'sent' => 'Your password link has been sent!',
'user' => 'No matching active user found with that email.',
'sent' => 'If a matching username and email address is found, a password reset link will be sent!',
'user' => 'No matching active user found.',
];
@@ -31,11 +31,11 @@
<div class="form-group{{ $errors->has('email') ? ' has-error' : '' }}">
<div class="form-group{{ $errors->has('username') ? ' has-error' : '' }}">
<div class="col-md-12">
<input type="email" class="form-control" name="email" value="{{ old('email') }}" placeholder="{{ trans('admin/users/table.email') }}">
{!! $errors->first('email', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
<input type="text" class="form-control" name="username" value="{{ old('username') }}" placeholder="{{ trans('admin/users/table.username') }}">
{!! $errors->first('username', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>
</div>
@@ -31,12 +31,12 @@
<input type="hidden" name="token" value="{{ $token }}">
<div class="form-group{{ $errors->has('email') ? ' has-error' : '' }}">
<label class="col-md-4 control-label">{{ trans('admin/users/table.email') }}</label>
<div class="form-group{{ $errors->has('username') ? ' has-error' : '' }}">
<label class="col-md-4 control-label">{{ trans('admin/users/table.username') }}</label>
<div class="col-md-6">
<input type="email" class="form-control" name="email" value="{{ $email or old('email') }}">
{!! $errors->first('email', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
<input type="text" class="form-control" name="username" value="{{ $username or old('username') }}">
{!! $errors->first('username', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>
</div>