We're using RealName to pull in user's full names from LDAP after they log in with an ID number.

The Full Name is showing in some lists, but in case tracker assignees, activity, etc. the ID number is being displayed, and if I not logged in as the administrator the ID number is used almost everywhere.

It seems to be where the Profile is used the correct full name is displayed, but where the User data is used it is the ID number.

How do you make RealName display everywhere in the site? This is an Open Atrium install.

much appreciated!

Comments

NancyDru’s picture

By demanding that the displaying module use correct theming techniques. RealName builds it and makes it available, but if the displaying module does its own stuff, then you are at that developer's mercy.

omcode’s picture

Thanks NancyDru.

So how do we override that? Is there a core user query that can be changed?
The "real names" are in the database profile_values table, could it be a single query change for the whole site and use that instead of name from users?

NancyDru’s picture

In D6 there is a function theme('username', ...) that should be used by the displaying module. No, it can't be changed globally because of things like the node edit form that have to have the correct internal username.

omcode’s picture

omcode’s picture

Title: RealName not dispalying full name everywere (Atrium & LDAP) » RealName not dispalying full name everywere and only for ADMIN?

I have been trying to fix this using views.
The RealName "Profile: Full Name" is availble in a lot of places I need it.
But there are two pervasive issues I want to ask about:

- How do you get RealName to change name at top of the screen with the user's picture
and in little "user bubble" in lists like the blog posts, next to the title there is a small user image, name, and date of post or comment?
- And why would many of the view changes only work when logged in as admin, but not when logged in as any another user?

We're looking to avoid core and module hacks, if you have any suggestions please let me know.

thanks!

omcode’s picture

I've been trying to fix this in views and specific overrides.
A question that keeps coming up is why the User menu (on the left side in a default Drupal install) does not use RealName, is this by design, was it intended to be implemented in the Theme?

omcode’s picture

Part of this was fixed by changing Permissions. Much is still not taking the RealName.

omcode’s picture

I've been trying to fix this in views and specific overrides in a module.
What I don't understand is why the User menu (on the left side in a default Drupal install) does not use RealName, and sections like Notifications and Profile Buttons, is this by design, was it intended to be implemented in a Theme?

ibandyop’s picture

Can you elaborate what permissions fixed the issue mentioned in #7
Also how are you fixing this. I see the same issue in D7.10 and Real name 7.x-1.0-rc2

Alan D.’s picture

I just hit this and found that the user object may not be fully loaded. An easy workaround that fixed my install was a pre-processor to load as required. In the theme momentum12 i added:

function momentum12_preprocess_username(&$vars) {
  static $users = array();
  $account = $vars['account'];
  # The field field_real_name is being used for the real name via the name field module
  if (!isset($account->field_real_name)) {
    if (!isset($users[$account->uid])) {
      $account = user_load($account->uid);
      $users[$account->uid] = $account;
    }
    else {
      $account = $users[$account->uid];
    }
    if (!empty($account->realname)) {
      $vars['name'] = $account->realname;
      $vars['account'] = $account;
    }
  }
}
hass’s picture

Issue summary: View changes
Status: Active » Closed (outdated)
amjad.khan’s picture

Thanks Alan. It works..