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:
parent
3e802c1cf8
commit
2725d9d18b
@ -20,7 +20,7 @@ class DatabaseLookup
|
||||
}
|
||||
|
||||
if ($guard == 'user') {
|
||||
if ($server = session(SESSION_DB_SERVER)) {
|
||||
if (Auth::check() && $server = session(SESSION_DB_SERVER)) {
|
||||
config(['database.default' => $server]);
|
||||
$user = Auth::user()->fresh();
|
||||
$user->load('account');
|
||||
|
@ -425,7 +425,7 @@ User::updating(function ($user) {
|
||||
User::onUpdatingUser($user);
|
||||
|
||||
$dirty = $user->getDirty();
|
||||
if (isset($dirty['email']) || isset($dirty['confirmation_code'])) {
|
||||
if (array_key_exists('email', $dirty) || array_key_exists('confirmation_code', $dirty)) {
|
||||
LookupUser::updateUser($user->account->account_key, $user->id, $user->email, $user->confirmation_code);
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user