Drupal 7 added the format_username function for displaying full user names instead of login ids.
--- a/login_one_time.module
+++ b/login_one_time.module
@@ -249,7 +249,8 @@ function login_one_time_button_form($form, $form_state, $username =
'#type' => 'value',
'#value' => $username,
);
- $button_text = t('Send login one time link to !username', array('!username' => $use
+ $account = user_load_by_name($username);
+ $button_text = t('Send login one time link to !username', array('!username' => form
}
else {
$form['account'] = login_one_time_users_widget();
Comments
Comment #1
pillarsdotnet commentedPatch.
Comment #2
danielb commentedI think we should check_plain() the result, or use the @ placeholder in t(). This is advised in the comments for format_username().
The other problem is then this will be inconsistent with the list of user options given by login_one_time_user_options(), however using format_username here may produce unexpected behaviour with the autocomplete widget?
I'll mess around with it when I get a chance.
Comment #3
danielb commentedI've chucked that in now.