[horde] can _prefs_hook_from_addr return an array?

lst_hoe02 at kwsoft.de lst_hoe02 at kwsoft.de
Fri Jun 3 07:37:50 UTC 2011

Zitat von Matus UHLAR - fantomas <uhlar at fantomas.sk>:

> Hello,
> if I create _prefs_hook_from_addr, will horde (ver 3 for now) understand if
> it returns array of allowed addresses?

We once solved it for SQL-Database this way for Horde3 not sure how to  
do it in Horde4.


global $conf;
$account = Auth::getAuth();
include_once 'DB.php';
$_db = &DB::connect($conf['sql2'],true);
$query = 'SELECT alias FROM virtual WHERE username=?';
foreach ($sqldata as $key => $value) {
     $result["$value"] = $value;

// user preferred email address for From: line
// If you lock this preference, you must specify a value or a hook for it in
// horde/config/hooks.php.
$_prefs['from_addr'] = array(
     'value' => '',
     'locked' => false,
     'shared' => true,
//    'type' => 'text',
     'type' => 'enum',
     'enum' => $result,
     'desc' =>  _("Your From: address:")

I never get it to work with the hook so we hacked it in the prefs.php  
file. With this the user can only choose from the mail addresses  
belonging to his/her account.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6046 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.horde.org/archives/horde/attachments/20110603/3456c859/attachment.bin>

More information about the horde mailing list