I have situation as follows:

I have three types/roles of users.

  • AdminRole
  • Dealer Role
  • CustomerRole

I have given permission to "Dealer Role" to create/add "Customer Role" user. That works fine for me.

But my daunting task is as follows:

I am using "Profile2" module for "Customer Role" user.

I have created one profile_type in Profile2 module in which 6 fields are there with separate page for editing profiles page.

Also i have enabled UNIQUE REGISTRATION Path.

Although i have access to the unique registration path when none of the user is logged in system and administrator is log-in.

I want to give "Profile2" module permission in a way that "Dealer Role" having permission to create/add data to the "Customer Role".

In simple, when "Dealer Role" is logged in system, dealer can manage "Customer Role" user.

Thanks Same

closed as unclear what you're asking by kiamlaluno Jul 11 '16 at 12:14

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • solved by me any way.. – sandip Dec 30 '15 at 12:21

global $user;

$uid = $user->uid;

$accessRoleArr = '';

if(in_array('Admin',$user->roles) || in_array('Dealer',$user->roles) || in_array('Customer',$user->roles))

{ return FALSE; }

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