All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.gu.pandomainauth.model.User.scala Maven / Gradle / Ivy

There is a newer version: 0.4.0
Show newest version
package com.gu.pandomainauth.model

case class User(firstName: String, lastName: String, email: String, avatarUrl: Option[String]) {
  def toJson = {
    s"""{"firstName": "$firstName", "lastName": "$lastName", "email": "$email" ${avatarUrl.map( u => s""", "avatarUrl": "$u" """).getOrElse("")} }"""
  }

  def emailDomain = email.split("@").last
  def username = email.split("@").head
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy