From 5b7d0841b71f51051c828e42435211dfadcdcf02 Mon Sep 17 00:00:00 2001 From: "Dr. Stefan Schimanski" Date: Sun, 23 Mar 2014 10:07:59 +0100 Subject: [PATCH] Store Twitter screen_name in user object Twitter supports a screen_name and a (full) name. The former was not exported via the SocialUser class. We now misuse the firstName field to store the screen_name. --- .../app/securesocial/core/providers/TwitterProvider.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module-code/app/securesocial/core/providers/TwitterProvider.scala b/module-code/app/securesocial/core/providers/TwitterProvider.scala index ae8c9ba46..d2daa10fa 100644 --- a/module-code/app/securesocial/core/providers/TwitterProvider.scala +++ b/module-code/app/securesocial/core/providers/TwitterProvider.scala @@ -42,7 +42,8 @@ class TwitterProvider(application: Application) extends OAuth1Provider(applicati val userId = (me \ Id).as[String] val name = (me \ Name).as[String] val profileImage = (me \ ProfileImage).asOpt[String] - user.copy(identityId = IdentityId(userId, id), fullName = name, avatarUrl = profileImage) + val screenName = (me \ ScreenName).as[String] + user.copy(identityId = IdentityId(userId, id), firstName = screenName, fullName = name, avatarUrl = profileImage) } catch { case e: Exception => {