This repository was archived by the owner on Apr 19, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,6 @@ public function enabled(User $user)
1818 if ($ conf === 'per_user ' ) {
1919 return !is_null ($ user ->twoFactorAuth );
2020 }
21- return ( bool ) $ conf ;
21+ return $ conf === ' always ' ;
2222 }
2323}
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ public function setTwoFactorAuthId(string $id) : void
3131 // respect when 2fa is not set for user, never insert
3232 $ this ->twoFactorAuth ->update (['id ' => $ id ]);
3333 }
34- elseif ($ enabled ) {
34+ elseif ($ enabled === ' always ' ) {
3535 $ this ->upsertTwoFactorAuthId ($ id );
3636 }
3737 }
Original file line number Diff line number Diff line change 88 |--------------------------------------------------------------------------
99 |
1010 | Options:
11- | - true : always require two-factor authentication
12- | - false: never require two-factor authentication
11+ | - 'always' : always require two-factor authentication
12+ | - 'disabled': disabled, never require two-factor authentication
1313 | - 'per_user': look if a row exists in the two_factor_auths table for the
1414 | user
1515 |
8787 | \App\User is used, but its primary key can be specified
8888 |
8989 */
90+
9091 'models ' => [
9192 'user ' => [
9293 'pk ' => 'id '
You can’t perform that action at this time.
0 commit comments