Hey Cees,I seem to be having another problem with the Authorization/ Authentication plugins. I recently switched to using my own login method instead of the one provided with the module (from login_box) so that it would fit in better with my sites look. However, when I did this, the user is no longer redirected to where they were before the login was requested. I took a look at the code that was being used in login box and it seems that my problem is the destination variable. In the login box function you do this:
my $runmode = $self->_cgiapp->get_current_runmode;
my $destination = $query->param('destination') || $query->self_url;
my $action = $query->url( -absolute => 1 );
I similarity copied those call into my module to populate the
hidden fields, i.e., in my Template code I have this:
<input type="hidden" name="destination" value="[% destination %]" /> <input type="hidden" name="node" value="[% runmode %]" />It seems that $query->self_url is the only this that has a value and therefor destination is always set to $query->self_url. I think that would work if the login was a runmode in the same file as the function requiring the authorization. Since I am using LOGIN_URL, the $query->self_url does not have the correct value. This leads me to believe that the destination param should be set (maybe in redirect_to_login) so that when using the LOGIN_URL option the user is sent to the correct place after logging in.
Also, is there a way to get what the user did wrong in they are not able to log in correctly. Let the password didn't make the one provided for the username or perhaps that the username didn't exist. Just so they could have some feedback?
Let me know if this makes sense. Or if you see an error in what I am doing.
Thanks. Michael Petnuch
smime.p7s
Description: S/MIME cryptographic signature
