Skip to content

Instantly share code, notes, and snippets.

@Arcath
Created March 26, 2011 09:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Arcath/888172 to your computer and use it in GitHub Desktop.
Save Arcath/888172 to your computer and use it in GitHub Desktop.
LDAP Omniauth session code (pre ldap improving)
def create
user = User.find_by_provider_and_uid("ldap",params[:username]) || User.create_with_omniauth("ldap",params[:username])
session[:user_id] = user.id
redirect_to "/pages/splash"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment