add Hotmail mailbox name uniqueness constraint (bot-stopper)
This commit is contained in:
parent
2c8cd28e55
commit
46d26efbc3
@ -352,7 +352,9 @@ class User < ApplicationRecord
|
|||||||
def set_unique_email
|
def set_unique_email
|
||||||
user, domain = self.email.split('@')
|
user, domain = self.email.split('@')
|
||||||
user = user.split('+').first
|
user = user.split('+').first
|
||||||
user = user.gsub('.', '') if domain == 'gmail.com'
|
if ((domain == 'gmail.com') || (domain == 'hotmail.com'))
|
||||||
|
user = user.gsub('.', '')
|
||||||
|
end
|
||||||
self.unique_email = "#{user}@#{domain}"
|
self.unique_email = "#{user}@#{domain}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user