[imp] default from address (maybe ['hooks']['from'])

Liam Hoekenga liamr@umich.edu
Sun, 27 Jan 2002 13:35:06 -0500


> That latter is what actually should happen. If a user that logs in doesn't 
> have an identity defined, a default identity is created with all the 
> defaults that are set in prefs.php or by any hooks. This identity is even 
> stored in the preferences backend not only in the session so that it's 
> available the next time he logs in.
> 
> I'll take a look if I can reproduce what you describe because it's a bug 
> then.

Jan -

The default identities are getting setup with the values from prefs.php - it's 
just that w/o using the hooks, those default entries from 
$_prefs['fullname']['value'] and $_prefs['from_addr']['value'] are ''.

Here's what one of our default identities looks like in our table:

liamr:horde:identities:a:1:{i:0;a:9:{s:2:"id";s:16:"Default 
Identity";s:8:"fullname";s:0:"";s:9:"from_addr";s:0:"";s:12:"replyto_addr";s:0:
"";s:9:"signature";s:0:"";s:9:"sig_first";i:0;s:10:"sig_dashes";i:0;s:14:"save_
sent-mail";N;s:16:"sent_mail_folder";s:9:"sent-mail";}}::::

so.. the from line in our composition windows only says "(Default Identity)" if 
the user hasn't customized their default identity.  ['hook']['from'] only 
changes the from address on the outgoing message, not in this display.  It 
seems like that value is easily enough created w/o user intervention.

and using the ['hooks']['fullname'] we could autopopulate it either using gecos 
(as in the example), or querying LDAP for that information.

Any suggestions on updating the ~8000 user entries who probably haven't 
customized their default identity?  Perl mebbe?

thx
Liam