Merge pull request #733 from openclassify/dia

#2411 [emadencilik] [bonus] Fields to fill in to earn bonuses
This commit is contained in:
Ozcan Durak 2020-10-21 10:39:33 +03:00 committed by GitHub
commit f27c3418c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);