Hi I'm new to RoundCube, walking thru the code to customize it.
It seems to me that there's no existing plugin that handles the 'login_after' hook.
Given the line 123 in the index.php file:
$redir = $RCMAIL->plugins->exec_hook('login_after', $query + array('_task' => 'mail'));
and the system is working well, I must be missing something. Can anyone help?
Tks.
That is simply one of many hooks which plugins can use if they want. I'm sure there are plugins around which use it. Which ones use it in your setup depend on what plugins you have installed......
Hi John, tks for replying.
In the standard download, I scanned through all the files in the plugins folder, but couldn't find any file with an explicit statement:
add_hook('login_after')
That's what puzzles me. Could u pls point out 1 for me?
(Since I'm following the workflow, but get stuck there).
you are right, there are none distributed with the core which use it. but if you look here you'll find a few, for example remember_me and remember_skin which are part of the myroundcube package.
hi John,
Let me rephrase my question. What I want to know is which file (or plugin ) is called after the line 124 $OUTPUT->redirect($redir) is executed.
(Since I dont know which plugin that handled 'login_after' hook, can't find what the value of $redir is)
Could you pls help? tks.
$redir = $RCMAIL->plugins->exec_hook('login_after', $query + array('_task' => 'mail'));
unset($redir['abort']);
// send redirect
$OUTPUT->redirect($redir);
If there's no plugin for this hook or plugin doesn't change anything then:
$redir = $query + array('_task' => 'mail');
tks alec for rep,
so what's the value of $redir then?
and what file is called after $OUTPUT->redirect($redir) is executed?
you see a few lines above the execute_hook line, $query is populated with the information from the requesting url - if there is any. then _task=mail is put of coz its needed to actually get to the inbox and thats it. redirect to that URL, it will normally end up just being /?_task=mail
tks JohnDoh