Thank you for this module! I know that it's still a work in progress, but I didn't see any discussion about integration with the Realname module. My current project is a Realname application, so group admins/members are not going to know usernames or email addresses. We'll also be restricting invitations to authenticated users.

Are there any plans to integrate with Realname?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mstef’s picture

Status: Active » Postponed (maintainer needs more info)

Do you see any specific place where realname is not working within this module? I've never used realname, but it was my understanding that it will take over theme('username', $user).

rhymeswithcamera’s picture

Well, at this point, I can't seem to invite any existing users by username or real name. I get the $invalid error message. I can, however, add members through OG's default og/users/%/add_user page.

But back to your question, your understanding is the same as mine. [Disclaimer: I'm not a developer-type.] What I've experienced, however, is that any modules I use that support the Real Name module have been explicitly integrated with the module. Case in point: OG Invite Restrict provides autocomplete on real names, but unfortunately, when you select the real name from the autocomplete drop-down, the username - not the real name - is copied to the To: field. Ideally, I want the Real Name to be displayed (since that's the only name authenticated users see) and keep the username hidden for processing.

I don't know if that answers your question. Let me know if you need more information. Who would've thunk that inviting folks by their real name would be such a challenge? :)

mstef’s picture

Title: Integration with Realname » Integration with Realname (aka add an autocomplete)
Assigned: Unassigned » mstef
Status: Postponed (maintainer needs more info) » Active

Ooohh you mean you want to type in the users real name to send the invite (vs there user name)?

I completely misunderstood your question then...

Best solution would be to introduce an autocomplete, which in turn will use theme('username') so realname should be able to jump right in (and if not, at least we still have an autocomplete, right?).

rhymeswithcamera’s picture

Yes, that would be great! Thank you much for considering it.

vasi1186’s picture

Hi,

the autocomplete feature is one of the next on our todo list. With the realname, I see a problem... it's not so much a technical problem (because maybe we could show the Real name in the autocomplete field, and keep somehow the username hidden), as it is a usability problem. Because the names are generated from user profile fields, then it is quite possible to have more users with the same Real name. In this case, the administrator will just not know which user to invite. That's why in this case the username, because it is unique, is a good choice for the autocomplete fields. But if you have any ideas on how to solve this usability issue, we can try to find a solution to implement it.

Vasi.

rhymeswithcamera’s picture

Great question. This issue has been raised in other modules that integrate with Realname. A common approach that I've seen is to include the user's username or email address in parentheses, e.g. Mickey Mouse (themouse) OR Mickey Mouse (themouse@disneyland.com). Give the site configurator the option to display the username, email address or none along with the Realname. When the sender selects from the autocomplete list, display only the Realname.

For sites that are trying to shield the username and email address, this approach exposes this information, but only temporarily to help out the sender.

With other modules that integrate with Realname where you can enter in a list of comma-separated names, I haven't found a module that gracefully handles bad names being entered. One module that gets closer (can't recall which one at the moment) has a separate autocomplete textfield that, once validated, adds it to a larger textarea field - much like your Invitees field - and builds the list up to 10 names.

Another approach that I haven't seen by way of Drupal modules, but on other non-Drupal sites that allow invitations, is to display 10, e.g., separate textfields. The sender then can add 1-10 names, all validated one field at a time, click send, then add more. This approach takes up more real estate, but from a usability standpoint, it's pretty clear that you're allowed to invite up to 10 people at a time.

On a related note, I just checked out how Facebook is currently doing it - since it's probably the most popular Realname apps out there. They used to load up the user's photo along with his/her name, which made it easy to make sure you had the right Mickey Mouse. They don't do that anymore. They just list the Realname. So now if you have two Mickey Mouse's as friends, there's no way to determine which one is which when sending a message. At all. Which circles back to this very issue.

mstef’s picture

Title: Integration with Realname (aka add an autocomplete) » Integration with Realname
Status: Active » Postponed

Autocomplete added. Realname integration will be postponed till we have 1.0 release.

rhymeswithcamera’s picture

Sounds good. Any estimate (or guess) when 1.0 will be available? A few months? By end of year? Just looking for a ballpark so I can decide how and when to rollout our "life group" feature.

mstef’s picture

Very soon

rhymeswithcamera’s picture

Nice! Thanks!

mparker17’s picture

Subscribe.

mrvinch’s picture

Subscribe. Great module, thanks.

Crom’s picture

subscribing - good discussion. My thoughts on realname integration relating to #6: showing the usernames in brackets isn't going to help sites to which users have no access to usernames and they are auto-generated. It will just be meaningless to them. Your suggestion of a list with pictures attached is a good one, or perhaps an admin-selectable profile field (eg country/town/age etc).

Cheers,
Crom

Crom’s picture

In case it's helpful to people, I've created a quick patch to allow realname to 'take over' duties if it's installed as showing usernames is not an option for me.

It's created against the dev build at Oct 15 2011.

if realname is installed, realnames are returned by the auto-complete instead of usernames. The message is then sent out using the standard channel.

Known problems:
- issue with duplicate real names are not dealt with yet:
1) I can't work out how to be able to return the 'correct' uid when we need to load the account details in og_invite_link_invite_users_to_groups() as we only have the realname to work with - unless we can pass the uid into this function?
2) User pictures (if available) would be good to be displayed alongside the realname in the auto-complete drop-down.

If someone can give me a steer on the known problems I'll work something up but I'm a bit tight for time at the moment to research how best to do this.

Cheers,
Crom

Crom’s picture

...and the patch...

soulfroys’s picture

Status: Postponed » Needs review
FileSize
3.98 KB

I'm using the latest dev and everything is working fine. I add realname variables "@sent-to, @sent-to-realname, @sent-by, @sent-by-realname".

----
Drupal/PHP newbie

soulfroys’s picture

Or better yet, this approach (og core): http://drupal.org/node/1096410#comment-5086342

     // Populate the message variables
      $variables = array(
        '@group' => check_plain($group->title),
        '@site' => variable_get('site_name', 'Drupal'),
        '@description' => check_plain($group->og_description),
        '@body' => $params['additional_message'],
-       '@sent-to' => $sent_to->name,
+       '@username' => strip_tags(theme('username', $sent_to)),
-       '@sent-by' => $sent_by->name,
+       '@username' => strip_tags(theme('username', $sent_by)),
        '!group_url' => $invite_url,
      );