Token implementation for profile is wrong
seutje - July 3, 2009 - 14:23
| Project: | Invite |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
in _invite_token_types it uses the global $user, which doesn't have the profile fields in it
easy fix is to reload the user object by putting this right after the global $user in _invite_token_types:
<?php
if ($user->uid) {
$user = user_load(array('uid' =>$user->uid));
}
?>that was the $user->profile_fieldname will be populated and profile tokens will work, given that http://drupal.org/node/125640#comment-1590814 is applied
