Arc Forumnew | comments | leaders | submitlogin
Example: Rewriting the login code (archub.org)
14 points by pg 5687 days ago | 2 comments


1 point by CatDancer 5687 days ago | link

I notice the code to have the login result in either an html page or a redirect is somewhat awkwardly distributed between login-form (through fnform) and the login function itself.

I found it helpful to make a base op in srv.arc which outputs no headers, and then my login function was able to itself either output a page, or call a function named redirect with the url which outputs the redirect headers.

-----

1 point by thaddeus 5685 days ago | link

Much nicer!

Interesting though - I do find it odd that when applying defopl to the root "||" the function doesn't return to the root after login, but rather it fowards to an 'afterward' of "y". Looks as though the code expects that you pass a string in as the afterward and will not take || as an argument.

T.

-----