pyc-website
main website for pyc inc.
git clone https://9o.is/git/pyc-website.git
commit 69fb169b6c1e3d97107625377eea2cd03ff2c19b parent 34a73e83f8f30f34c94dbac7f16d86d178929802 Author: Jul <jul@9o.is> Date: Tue, 3 Jun 2014 15:31:01 -0400 fixed deprecations in User model Diffstat:
| M | src/main/scala/inc/pyc/model/User.scala | | | 22 | ++++++++++++---------- |
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/src/main/scala/inc/pyc/model/User.scala b/src/main/scala/inc/pyc/model/User.scala @@ -101,9 +101,10 @@ object User extends User with ProtoAuthUserMeta[User] with RogueMetaRecord[User] def sendLoginToken(user: User): Unit = { import net.liftweb.util.Mailer._ - val token = LoginToken.createForUserId(user.id.get) - - val msgTxt = + val token = LoginToken.createForUserIdBox(user.id.get) + + token.map { token => + val msgTxt = """ |Someone requested a link to log in to your %s account. | @@ -118,18 +119,19 @@ object User extends User with ProtoAuthUserMeta[User] with RogueMetaRecord[User] |%s """.format(siteName, token.url, sysUsername).stripMargin - sendMail( - From(MongoAuth.systemFancyEmail), - Subject("%s Account: Login".format(siteName)), - To(user.fancyEmail), - PlainMailBodyType(msgTxt) - ) + sendMail( + From(MongoAuth.systemFancyEmail), + Subject("%s Account: Login".format(siteName)), + To(user.fancyEmail), + PlainMailBodyType(msgTxt) + ) + } } /* * ExtSession */ - def createExtSession(uid: ObjectId) = ExtSession.createExtSession(uid) + def createExtSession(uid: ObjectId) = ExtSession.createExtSessionBox(uid) /* * Test for active ExtSession.