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 +9
-9
lines changed Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -14,11 +14,11 @@ abstract class BaseProvider
1414 */
1515 public function enabled (User $ user )
1616 {
17- $ conf = config ('twofactor-auth.enabled ' , 'per_user ' );
18- if ($ conf === 'per_user ' ) {
17+ $ conf = config ('twofactor-auth.enabled ' , 'user ' );
18+ if ($ conf === 'user ' ) {
1919 return !is_null ($ user ->twoFactorAuth );
2020 }
2121
22- return $ conf === 'always ' ;
22+ return $ conf === 'enabled ' ;
2323 }
2424}
Original file line number Diff line number Diff line change @@ -26,13 +26,13 @@ public function twoFactorAuth() : HasOne
2626 */
2727 public function setTwoFactorAuthId (string $ id ) : void
2828 {
29- $ enabled = config ('twofactor-auth.enabled ' , 'per_user ' );
30- if ($ enabled === 'per_user ' ) {
29+ $ enabled = config ('twofactor-auth.enabled ' , 'user ' );
30+ if ($ enabled === 'user ' ) {
3131 // respect when 2fa is not set for user, never insert
3232 $ this ->twoFactorAuth ->update (['id ' => $ id ]);
3333 }
3434
35- if ($ enabled === 'always ' ) {
35+ if ($ enabled === 'enabled ' ) {
3636 $ this ->upsertTwoFactorAuthId ($ id );
3737 }
3838 }
Original file line number Diff line number Diff line change 88 |--------------------------------------------------------------------------
99 |
1010 | Options:
11- | - 'always ': always require two-factor authentication
11+ | - 'enabled ': always require two-factor authentication
1212 | - 'disabled': disabled, never require two-factor authentication
13- | - 'per_user ': look if a row exists in the two_factor_auths table for the
13+ | - 'user ': look if a row exists in the two_factor_auths table for the
1414 | user
1515 |
1616 */
1717
18- 'enabled ' => 'per_user ' ,
18+ 'enabled ' => 'user ' ,
1919
2020 /*
2121 |--------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments