I mostly have merb-auth (using the password slice) working correct.
There's still one piece I'm failing to figure out.
In slices/merb-auth-slice-password/app/controllers/sessions.rb
I have edited as follows:
private
# @overwritable
def redirect_after_login
message[:notice] = "Login Successful. Enjoy ShellShadow!"
session[:display_name] = session.user.display_name
redirect_back_or url(:home), :message => message, :ignore =>
[slice_url(:login), slice_url(:logout)]
end
The line: session[:display_name] = session.user.display_name
works well when I do a normal login.
However, if some other controller action authenticates the user (for
examples, when the user activates his account, I automatically log him
in as part of the activation process), I use this line in my
controller:
session.user = user
This works in that the user is authenticated so far as merb-auth is
concerned. However, I do not get the display_name set in the cookie.
I obviously should not be setting the display_name in
redirect_after_login, but somewhere else.
Any tips?
thanks, Jon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"merb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/merb?hl=en
-~----------~----~----~----~------~----~------~--~---