Completely convert the old communication module over to the new system... (almost).

TODO: switch the "send" to the new dialog-style preview and confirmation, instead of the old one, but at least it works!
This commit is contained in:
james
2009-12-02 22:17:20 +00:00
parent 06d9e74190
commit 99114c7242
10 changed files with 420 additions and 326 deletions
+16
View File
@@ -215,6 +215,22 @@ function user_load($user, $uid = false)
/* Convenience */
$ret['name'] = $ret['firstname'].' '.$ret['lastname'];
/* Email recipient for "to" field on emails */
if( ($ret['firstname'] || $ret['lastname']) && $ret['email']) {
//use their full name if we have it
//if the name contains anything non-standard, we need to quote it.
if(eregi("[^a-z0-9 ]",$ret['name']))
$ret['emailrecipient']="\"{$ret['name']}\" <{$ret['email']}>";
else
$ret['emailrecipient']="{$ret['name']} <{$ret['email']}>";
}
else if($ret['email']) {
//otherwise, just their email address
$ret['emailrecipient']=$ret['email'];
}
else
$ret['emailrecipient']="";
foreach($ret['types'] as $t) {
/* These all pass $ret by reference, and can modify
* $ret */