Skip to content

Instantly share code, notes, and snippets.

@adinapoli
Created September 16, 2012 08:57
Show Gist options
  • Save adinapoli/3731663 to your computer and use it in GitHub Desktop.
Save adinapoli/3731663 to your computer and use it in GitHub Desktop.
createUser unm pwd
| null (strip unm) = return $ Left "Username cannot be empty"
| otherwise = withBackend $ \r -> do
u <- liftIO $ buildAuthUser r unm pwd
return $ Right u
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment