This website works better with JavaScript.
Home
Explore
Help
Sign In
closed-social
/
mastodon
Watch
3
Star
0
Fork
2
Code
Issues
5
Pull Requests
0
Projects
0
Releases
3
Wiki
Activity
Browse Source
temporarily disable security code email
closed-social-v3
TA
3 years ago
parent
14630f3f48
commit
50101ad5f2
1 changed files
with
2 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+2
-1
app/models/user.rb
+ 2
- 1
app/models/user.rb
View File
@ -200,7 +200,8 @@ class User < ApplicationRecord
end
def
suspicious_sign_in?
(
ip
)
!
otp_required_for_login?
&&
current_sign_in_at
.
present?
&&
current_sign_in_at
<
2
.
weeks
.
ago
&&
!
recent_ip?
(
ip
)
# !otp_required_for_login? && current_sign_in_at.present? && current_sign_in_at < 2.weeks.ago && !recent_ip?(ip)
false
end
def
functional?
Write
Preview
Loading…
Cancel
Save