mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-03 01:37:19 +00:00
Merge pull request #1264 from sharelatex/hb-set-reversedHostname-on-user-create
Set reversedHostname on user creation GitOrigin-RevId: 35ba4a5ae6aa792ee1c46e8b2b99d2e6ed00af17
This commit is contained in:
parent
65c1943c63
commit
3bc9ce995a
2 changed files with 2 additions and 0 deletions
|
@ -25,6 +25,7 @@ module.exports = UserCreator =
|
|||
user.emails = [
|
||||
email: user.email
|
||||
createdAt: new Date()
|
||||
reversedHostname: user.email.split('@')[1].split('').reverse().join('')
|
||||
]
|
||||
|
||||
user.save (err)->
|
||||
|
|
|
@ -78,6 +78,7 @@ describe "UserCreator", ->
|
|||
user.emails.length.should.equal 1
|
||||
user.emails[0].email.should.equal @email
|
||||
user.emails[0].createdAt.should.be.a 'date'
|
||||
user.emails[0].reversedHostname.should.equal "moc.liamg"
|
||||
done()
|
||||
|
||||
it "should add affiliation in background", (done)->
|
||||
|
|
Loading…
Reference in a new issue