Hi guys
Does anyone have an example of how to use before_call to check if a
user is logged in assuming that we use sessions to track logged in
users? I am in a bit of trouble trying to get this to work. I have
something like below:
before_call(is_logged_in, A) ->
{is_logged_in, [A]}.
is_logged_in([A]) ->
case utilman:check_cookie(A) of
{ok, Sess} ->
% do something
_ ->
% do something
end.
I get a long error trace when I try to access a function in the
controller:
Reason: {undef,
[{dashboard_controller,before_call,
[index,
[{arg,#Port<0.5879>,
{{127,0,0,1},60507},
{headers,"keep-alive",
....
Does anyone know how to make this work?
Thanks
Nii AMon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"erlyweb" 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/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---