[horde] question on horde identities on_change hook
Michael Menge
michael.menge at zdv.uni-tuebingen.de
Mon Mar 27 14:29:41 UTC 2017
Hi,
I try to write an on_change hook for horde identities/from_addr. My
goal is to restrict the
addresses our users can configure in horde/imp to their own addresses
and variants (plus-addressing).
The address verification feature ($conf[user][verify_from_addr]) could
work but we don't want to
allow external addresses and it should be unnecessary to send an email
as we already know the
allowed addresses.
In horde/config/prefs.local.php I have the following function.
$_prefs['from_addr']['on_change'] = function() {
global $prefs, $registry;
$data = $GLOBALS['registry']->getAuthInfo();
$userID=$data['authId'];
$value=$GLOBALS['prefs']->getValue('identities');
$value2=$prefs->getValue('from_addr');
Horde::logMessage("Horde Prefs call on_change for identities:
".$userID." value: ".$value." value2: ".$value2);
myVerifyFunction($userID, $value);
}
This function is call every time the Identity UI/form is saved.
But the value retrieved by getValue('identities') still contain the
old value before the change.
This is different then the other on_change calls in horde/imp
prefs.php (e.g. language, use_trash, trash_folder)
how can I retrieve the new value.
We use
horde 5.2.13
imp 6.2.17
Regards
Michael
--------------------------------------------------------------------------------
M.Menge Tel.: (49) 7071/29-70316
Universität Tübingen Fax.: (49) 7071/29-5912
Zentrum für Datenverarbeitung mail:
michael.menge at zdv.uni-tuebingen.de
Wächterstraße 76
72074 Tübingen
More information about the horde
mailing list