Closed (fixed)
Project:
User Registration Notification
Version:
5.x-1.8
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
12 Nov 2008 at 14:59 UTC
Updated:
20 Dec 2008 at 01:32 UTC
Further to #271338: custom user profile fields are not coming through - though the mail is now delivering the profile values correctly, it is still displaying the system field name instead of thee user-readable field title (eg. 'profile_child_firstname: ' instead of 'First Name: '. I don't know if this is intentional, an oversight or due to a difference between 5.x and 6.x, but I believe the user-readable titles would be preferable. It's easy enough to achieve by switching 'f.name' for 'f.title' on line 86 (and the concordant $field->name references below).
$result = db_query('SELECT f.name, f.type, v.value FROM {profile_fields} f INNER JOIN {profile_values} v ON f.fid = v.fid WHERE uid = %d', $account->uid);
while ($field = db_fetch_object($result)) {
switch ($field->type) {
case 'date':
$date_field = unserialize($field->value);
if (is_array($date_field)) {
$date_timestamp = mktime(0, 0, 0, $date_field['month'], $date_field['day'], $date_field['year']);
$profile_data .= sprintf("%s: %s\n", $field->name, format_date($date_timestamp));
}
break;
case 'checkbox':
if ($field->value)
$account_data .= sprintf("%s: Checked\n", $field->name);
else
$account_data .= sprintf("%s: Not Checked\n", $field->name);
break;
default:
$profile_data .= sprintf("%s: %s\n", $field->name, $field->value);
}
Comments
Comment #1
rmiddle commentedInteresting Idea. Will keep this in mind for the next release.
Comment #2
rmiddle commentedCommitted to both 5.x & 6.x CVS. Will be in 1.9 release.