I have created the group in og.

When adding the user for the group, In autocomplete its been displaying the user's email ID.

function custom_form_alter($form,&$form_state){ if($form['#id']== 'og-ui-add-users'){
     $form['og_user']['name']['#autocomplete_path'] = 'user/autocomplete';


But I want to get the name instead of email ID.

I have tried to change the user/autocomplete in hook_form_alter,but its displaying email id only

Is there any way to get name instead of email ID ?

Tell me how to sort out this problem?

  • have you written query. – vijay Mar 21 '17 at 8:02
  • No, I didnt write query – logeshvaran Mar 21 '17 at 8:04
  • Can you please update your question with coding.this might be useful. – vijay Mar 21 '17 at 8:05
  • added the code,just altered the form, But I dont know this method is right – logeshvaran Mar 21 '17 at 8:38

I didn't get a clear idea, anyway please Check This.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.