1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Override phone number with international format

This commit is contained in:
David Bomba 2022-11-03 17:26:52 +11:00
parent 1e249e87fe
commit e06563c00f
2 changed files with 4 additions and 7 deletions

View File

@ -64,6 +64,9 @@ class HasValidPhoneNumber implements Rule
$user = auth()->user();
request()->request->set('phone', $phone_number->phoneNumber);
request()->merge(['phone' => $phone_number->phoneNumber ]);
nlog($phone_number->phoneNumber);
$user->verified_phone_number = true;
$user->save();

View File

@ -56,12 +56,6 @@ class UserRepository extends BaseRepository
$company = auth()->user()->company();
$account = $company->account;
/* If hosted and Enterprise we need to increment the num_users field on the accounts table*/
// 05-08-2022 This is an error, the num_users should _never_ increment
// if (! $user->id && $account->isEnterpriseClient()) {
// $account->num_users++;
// $account->save();
// }
if(array_key_exists('oauth_provider_id', $details))
unset($details['oauth_provider_id']);
@ -140,7 +134,7 @@ class UserRepository extends BaseRepository
$cu->forceDelete();
}
event(new UserWasDeleted($user, $company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null)));
event(new UserWasDeleted($user, auth()->user(), $company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null)));
$user->delete();