Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShishkevich D. <135337715+shishkevichd@users.noreply.github.com>2025-07-02 12:25:25 +0300
committerGitHub <noreply@github.com>2025-07-02 12:25:25 +0300
commit5d11e6e13f7254a72874dabee6c1cf4e81f5ec52 (patch)
tree3e255de35ef4f9f4cb79daabaa7a696f10263dc1 /web/service/setting.go
parentf3d0b92e4ab2737f96fea3d0f567fdc040c21acb (diff)
chore: reset two-factor authentication after changing admin credentials (#3029)
* chore: add `resetTwoFactor` argument for main.go fixes #3025 * chore: reset two-factor authentication after changing admin credentials * chore: reset two-factor authentication after changing admin credentials --------- Co-authored-by: somebodywashere <68244480+somebodywashere@users.noreply.github.com> Co-authored-by: Sanaei <ho3ein.sanaei@gmail.com>
Diffstat (limited to 'web/service/setting.go')
-rw-r--r--web/service/setting.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/web/service/setting.go b/web/service/setting.go
index 62d66c11..868d55bc 100644
--- a/web/service/setting.go
+++ b/web/service/setting.go
@@ -322,10 +322,18 @@ func (s *SettingService) GetTwoFactorEnable() (bool, error) {
return s.getBool("twoFactorEnable")
}
+func (s *SettingService) SetTwoFactorEnable(value bool) error {
+ return s.setBool("twoFactorEnable", value)
+}
+
func (s *SettingService) GetTwoFactorToken() (string, error) {
return s.getString("twoFactorToken")
}
+func (s *SettingService) SetTwoFactorToken(value string) error {
+ return s.setString("twoFactorToken", value)
+}
+
func (s *SettingService) GetPort() (int, error) {
return s.getInt("webPort")
}