diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-08-05 21:38:27 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-08-05 21:38:27 +0000 |
commit | 8e2fb374e03ee2122fcfb678fd851673ca86eefa (patch) | |
tree | 125bb60c3515faf325cee613924033d03a8eebb1 /doc | |
parent | 06e74035770af03aec7b077baf15b34eeef7a8eb (diff) |
* Add sessioncgi hook.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/plugins/write.mdwn | 9 | ||||
-rw-r--r-- | doc/todo/cgi_hooks_get_session_objects.mdwn | 5 |
2 files changed, 13 insertions, 1 deletions
diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 90818c42e..416f1b86e 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -208,6 +208,15 @@ object's "name" parameter to the authenticated user's name. Note that if the name is set to the name of a user who is not registered, a basic registration of the user will be automatically performed. +### sessioncgi + + hook(type => "sessioncgi", id => "foo", call => \&sessioncgi); + +Unlike the cgi hook, which is run as soon as possible, the sessioncgi hook +is only run once a session object is available. It is passed both a CGI +object and a session object. To check if the user is in fact signed in, you +can check if the session object has a "name" parameter set. + ### canedit hook(type => "canedit", id => "foo", call => \&pagelocked); diff --git a/doc/todo/cgi_hooks_get_session_objects.mdwn b/doc/todo/cgi_hooks_get_session_objects.mdwn index c4bcdf185..edb9aba25 100644 --- a/doc/todo/cgi_hooks_get_session_objects.mdwn +++ b/doc/todo/cgi_hooks_get_session_objects.mdwn @@ -1,2 +1,5 @@ How about a hook to allow CGI objects to insist on authenticated users -only? I think "authcgi" would be a good name. --Ethan
\ No newline at end of file +only? I think "authcgi" would be a good name. --Ethan + +> This is now [[done]], although I called it sessioncgi since the user may +> or may not be authed. --[[Joey]] |