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();
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pillarsdotnet’s picture

Status: Active » Needs review
FileSize
1.03 KB

Patch.

danielb’s picture

Status: Needs review » Active

I 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.

danielb’s picture

Status: Active » Fixed

I've chucked that in now.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.