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

Multi-db fixes

This commit is contained in:
Hillel Coren 2017-05-15 16:58:07 +03:00
parent 76837ebe00
commit 1186603396

View File

@ -435,6 +435,11 @@ class AccountRepository
return trans('texts.oauth_taken');
}
// TODO remove once multi-db is enabled
if (User::whereOauthUserId($oauthUserId)->count() > 0) {
return trans('texts.oauth_taken');
}
if (! $user->registered) {
$rules = ['email' => 'email|required|unique:users,email,'.$user->id.',id'];
$validator = Validator::make(['email' => $email], $rules);