Skip to content

Commit f6b1cbd

Browse files
committed
dont throw error if no password broker is defined
1 parent da0e708 commit f6b1cbd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/BackpackServiceProvider.php

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

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

279280
$backpackPasswordBrokerTable = config('backpack.base.password_resets_table') ??
280281
config('auth.passwords.users.table') ??
281-
current($laravelAuthPasswordBrokers)['table'];
282+
$laravelFirstPasswordBroker;
282283

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

0 commit comments

Comments
 (0)