Page 1 of 1
event for login page
Posted: Mon Jan 31, 2005 7:32 pm
by oxygenws
is there any event for login page? (at serendipity_admin.php before login)
i want this for "forgot password" plugin ->
http://www.s9y.org/forums/viewtopic.php?t=988
Re: event for login page
Posted: Tue Feb 01, 2005 9:52 am
by garvinhicking
Does the 'backend_auth' hook suffice for you? (Grep through the files, don't know where exactly it is, but it's used for the login form...)
If not, just invent a hook and submit us a diff so we'll include it.
Regards,
Garvin
Posted: Tue Feb 01, 2005 6:11 pm
by oxygenws
there is only one file that has it, file "functions_config.inc.php" line 221.

i test it, i think it is useful
do you have any document on how to create events and how to use them?? what is parameters of serendipity_plugin_api::hook_event()?? first one is its name

what about others??
and.... what is backend_auth parameters??
Code: Select all
serendipity_plugin_api::hook_event('backend_auth', $is_md5, array('username' => $username, 'password' => $password));
Best regards,
Omid
Posted: Tue Feb 01, 2005 8:22 pm
by garvinhicking
Hi Omid!
Best you read our doc at
http://www.s9y.org/43.html
Short: hook_event($hookname, $eventData, $addData) is called in the source instance.
Then each plugin which "listens" on the $hookname, can execute data. It gets the $eventData and $addData variables defined. Their input varies on which hook is used.
Like frontend_display contains $eventData with the entries, and $addData with some more properties. And frontend_comments has $eventData containing the list of comments.
A plugin may modify $eventData as it likes. $addData is read-only, that's the difference.
Regards,
Garvin