mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Override phone number with international format
This commit is contained in:
parent
e06563c00f
commit
b3e02c8a70
@ -63,10 +63,7 @@ class HasValidPhoneNumber implements Rule
|
||||
|
||||
$user = auth()->user();
|
||||
|
||||
request()->request->set('phone', $phone_number->phoneNumber);
|
||||
request()->merge(['phone' => $phone_number->phoneNumber ]);
|
||||
|
||||
nlog($phone_number->phoneNumber);
|
||||
request()->merge(['validated_phone' => $phone_number->phoneNumber ]);
|
||||
|
||||
$user->verified_phone_number = true;
|
||||
$user->save();
|
||||
|
@ -59,6 +59,9 @@ class UserRepository extends BaseRepository
|
||||
if(array_key_exists('oauth_provider_id', $details))
|
||||
unset($details['oauth_provider_id']);
|
||||
|
||||
if (request()->has('validated_phone'))
|
||||
$details['phone'] = request()->input('validated_phone');
|
||||
|
||||
$user->fill($details);
|
||||
|
||||
//allow users to change only their passwords - not others!
|
||||
|
Loading…
x
Reference in New Issue
Block a user