mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
#2831 emlak24 requirements
This commit is contained in:
parent
1882151896
commit
b926180b0b
@ -375,6 +375,9 @@ return [
|
||||
'password' => [
|
||||
'name' => 'Password',
|
||||
],
|
||||
'old_password' => [
|
||||
'name' => 'Old password',
|
||||
],
|
||||
'new_password' => [
|
||||
'name' => 'New password',
|
||||
],
|
||||
|
||||
@ -29,6 +29,7 @@ return [
|
||||
'empty_password_sms_message' => 'Due to security issues, we changed your password! Your new password is:',
|
||||
'required_all' => "All Field is Required!",
|
||||
'can_not_remove_filled_fields' => "You can not remove filled fields!",
|
||||
'wrong_password' => "The password you entered is not correct!",
|
||||
|
||||
// Forgot Password
|
||||
'email_phone_not_found' => 'The E-mail, Phone Number is not correct!',
|
||||
|
||||
@ -236,6 +236,12 @@
|
||||
|
||||
{{ passwordForm.open()|raw }}
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<label class="font-weight-bold">{{ trans("visiosoft.module.profile::field.old_password.name") }}</label>
|
||||
{{ passwordForm.fields.old_password.input|raw }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="font-weight-bold">{{ trans("visiosoft.module.profile::field.new_password.name") }}</label>
|
||||
|
||||
@ -6,6 +6,13 @@ use Anomaly\Streams\Platform\Ui\Form\FormBuilder;
|
||||
class PasswordFormBuilder extends FormBuilder
|
||||
{
|
||||
protected $fields = [
|
||||
'old_password' => [
|
||||
'type' => 'anomaly.field_type.text',
|
||||
'required' => true,
|
||||
'config' => [
|
||||
'type' => 'password'
|
||||
],
|
||||
],
|
||||
'new_password' => [
|
||||
'type' => 'anomaly.field_type.text',
|
||||
'required' => true,
|
||||
|
||||
@ -4,6 +4,7 @@ use Anomaly\Streams\Platform\Message\MessageBag;
|
||||
use Anomaly\UsersModule\User\User;
|
||||
use Anomaly\UsersModule\User\UserPassword;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
|
||||
class PasswordFormHandler
|
||||
{
|
||||
@ -20,6 +21,11 @@ class PasswordFormHandler
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Hash::check($builder->getPostValue('old_password'), \auth()->user()->password)) {
|
||||
$messages->error(trans('visiosoft.module.profile::message.wrong_password'));
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
if ($builder->getPostValue('new_password') != $builder->getPostValue('re_new_password')) {
|
||||
$messages->error(trans('visiosoft.module.profile::message.password_do_not_match'));
|
||||
return redirect()->back();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user