#2411 [emadencilik] [bonus] Fields to fill in to earn bonuses

This commit is contained in:
Diatrex 2020-10-21 10:26:53 +03:00
parent 18e35ac6da
commit 5ee2b011c5
2 changed files with 9 additions and 0 deletions

View File

@ -28,6 +28,7 @@ return [
'ajax_address_error' => 'No address or not authorized to view.',
'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!",
// Forgot Password
'email_phone_not_found' => 'The E-mail, Phone Number is not correct!',

View File

@ -33,6 +33,14 @@ class ProfileFormHandler
$user = $userModel->newQuery()->find(\auth()->id());
// Prevent removing already filled fields
foreach ($parameters as $field => $value) {
if ($user->$field && !$value) {
$messages->error('visiosoft.module.profile::message.can_not_changed_filled_fields');
return;
}
}
$oldCustomerInfo = $user->toArray();
$changes = $this->change($user, $parameters);