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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user