getProfileR :: Handler RepHtml
getProfileR = do
    (Entity _ user) <- requireAuth

    let username = fromMaybe "" $ userName user
    let email    = fromMaybe "" $ userEmail user
    let pic      = gravatar gravatarOpts email

    defaultLayout $ do
        setTitle "View profile"
        $(widgetFile "profile/show")

    where
        gravatarOpts :: GravatarOptions
        gravatarOpts = defaultConfig
            { gSize    = Just $ Size 128
            , gDefault = Just MM
            }
getProfileR :: Handler RepHtml
getProfileR = do
    (Entity _ user) <- requireAuth

    let username = fromMaybe "" $ userName user
    let email    = fromMaybe "" $ userEmail user
    let pic      = gravatar gravatarOpts email

    defaultLayout $ do
        setTitle "View profile"
        $(widgetFile "profile/show")

    where
        gravatarOpts :: GravatarOptions
        gravatarOpts = defaultConfig
            { gSize    = Just $ Size 128
            , gDefault = Just MM
            }
getProfileR = do
    (Entity _ user) <- requireAuth

    let username = fromMaybe "" $ userName user
    let email    = fromMaybe "" $ userEmail user
    let pic      = gravatar gravatarOpts email

    defaultLayout $ do
        setTitle "View profile"
        $(widgetFile "profile/show")

    where
        gravatarOpts :: GravatarOptions
        gravatarOpts = defaultConfig
            { gSize    = Just $ Size 128
            , gDefault = Just MM
            }