I have created multiple profiles, each with it's own registration path (like "profile_name/register"). "Show on all user account registration forms" is unchecked for all profiles.

My problem is that the "profile_name/register" path works well, but the admin path "admin/people/p2rp-create/profile_name" is the same as the default "admin/people/create".

It seems that the specific profile fields are not loaded on the page. Even the role is not correctly assigned.

Any help would be appreciated.

Thanks!

Comments

george.plescan’s picture

I found the problem in the module file.

At line 179 the module grabs the path key (aka the profile name). On non admin pages the path key is at the beginning of the URL. But for admin pages it is at the end (for ex. admin/people/p2rp-create/stagiaire).

This is my code :

      // Grab profile name from URL.
      $path_parts = explode('/', $path);
      if (path_is_admin(current_path())) {
        // Grab last part of URL for admin pages.
        $path_key = end($path_parts);
      }
      else {
        // Grab first part of URL for non admin pages.
        $path_key = reset($path_parts);
      }