Closed (fixed)
Project:
Role Change Notify
Version:
5.x-1.1
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
2 Jul 2009 at 20:46 UTC
Updated:
22 Jul 2009 at 17:00 UTC
Just a quick suggestion to add the $userid (user's ID #) to the list of replacement text tokens. Having that value tokenized comes in handy when sending links to various screens on the recipient's user profile.
function _role_change_notify_get_variables($user, $rolename) {
global $base_url;
$variables = array(
'%username' => $user->name,
'%site' => variable_get('site_name', 'drupal'),
'%uri' => $base_url,
'%uri_brief' => drupal_substr($base_url, strlen('http://')),
'%mailto' => $user->mail,
'%date' => format_date(time()),
'%login_uri' => url('user', NULL, NULL, TRUE),
'%edit_uri' => url('user/'. $user->uid .'/edit', NULL, NULL, TRUE),
'%role' => $rolename,
'%userid' => $user->uid, // Added %userid here.
);
return $variables;
Thanks!
Comments
Comment #1
rfayCommitted to 5.x-1.2 and 6.x-1.2.
Comment #2
rfayComment #3
mgenovese commentedThanks!