Skip to content

Instantly share code, notes, and snippets.

@jhancock
Created December 30, 2008 18:29
Show Gist options
  • Save jhancock/41695 to your computer and use it in GitHub Desktop.
Save jhancock/41695 to your computer and use it in GitHub Desktop.
def login_user(user)
# FIXME The following line is not the "public" way to trigger auth'ing a user. It probably should be though ;). Currently, its not clear there is a public way to trigger the process through a controller action that is not part of the login process.
session.user = user
# FIXME The following line should be triggered by an after hook in merb-auth. Assumes the prior line is doing the right thing.
session[:display_name] = user.display_name
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment