Skip to content

Commit 6258db3

Browse files
authored
Merge pull request #5254 from Laravel-Backpack/fix-provider-for-password-resets
Fix provider for password resets broker registration
2 parents 5dde1d0 + 918aef4 commit 6258db3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/BackpackServiceProvider.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,10 +275,13 @@ public function loadConfigs()
275275

276276
// add the backpack_users password broker to the configuration
277277
$laravelAuthPasswordBrokers = app()->config['auth.passwords'];
278+
$laravelFirstPasswordBroker = is_array($laravelAuthPasswordBrokers) && current($laravelAuthPasswordBrokers) ?
279+
current($laravelAuthPasswordBrokers)['table'] :
280+
'';
278281

279282
$backpackPasswordBrokerTable = config('backpack.base.password_resets_table') ??
280283
config('auth.passwords.users.table') ??
281-
current($laravelAuthPasswordBrokers)['table'];
284+
$laravelFirstPasswordBroker;
282285

283286
app()->config['auth.passwords'] = $laravelAuthPasswordBrokers +
284287
[

0 commit comments

Comments
 (0)