Merges Profile2 forms into user account form.

Profile2 by default creates an aditional tab for each new profile assigned to a user.
Alternatively the submodule "Profile2 pages" provides a separated pages for viewing and editing profiles.

BUT there was no way to integrate profiles into account's user form.

This module does it. Now every profile (admin/structure/profiles/manage) can be "merged" into account user form.

http://drupal.org/sandbox/capynet/1917766

git clone --branch 7.x-1.x capynet@git.drupal.org:sandbox/capynet/1917766.git

This module was developed to be used in the official webpage of spanish Drupal association. (Attached a screenshot as example)

Comments

PA robot’s picture

Status: Needs review » Needs work

There are some errors reported by automated review tools, did you already check them? See http://ventral.org/pareview/httpgitdrupalorgsandboxcapynet1917766git

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

capynet’s picture

[There are some errors reported by automated...] but cant find the errors :S

capynet’s picture

ok coder now pass without errors :)

capynet’s picture

Status: Needs work » Needs review
Caseledde’s picture

Status: Needs review » Needs work

Hi,

I found an issue:

Why do you do this in profile2_one_page_form_user_profile_form_alter()?

<?php
if ($GLOBALS['user']->uid == 1) {
  return;
}
?>

In this way user/1 is not able to access the forms provided by profile2.



Let's talk about the require_once "profile2_one_page.admin.inc"; in the .module file:

Maybe you should move all your function implemented in profile2_one_page.admin.inc to the .module file. There are just hook implementations in profile2_one_page.admin.inc. Normaly there are form callbacks invoked by hook_menu(). So I think you don't need this extra file.

capynet’s picture

Status: Needs work » Needs review

Hi Caseledde. $GLOBALS['user']->uid == 1 was for debug purposes. I forgot it.

Moved profile2_one_page.admin.inc contents to .module file.

Thanks!

federiko_’s picture

Very useful module. I installed it in a fresh drupal installation with last profile2 version and it works well, but I have some comments :

.info : don't forget to remove ;files[] = profile2_one_page.admin.inc

.module : l.118-119 you could remove comment.

- Empty User account fieldset appears when editing profile. It should not appear here. (see screenshot, it appears at the bottom of form).

- Profiles edit tabs still appear although your hook_menu_alter should disable them… I don't know if it will help you buth path to edit profile form looks like this in my installation (logged with authenticated user which user id is 2) :
/profile-main/2/edit (main profile)
/profile-test_profile/2/edit (test profile)
It seems that your access callback (.module l.17) is targeting other path.

Good luck!

federiko_’s picture

Status: Needs review » Needs work
capynet’s picture

federiko_ can't find "Empty User account fieldset" screenshot and can't find that issue. And "Profiles edit tabs still appear" too. can attach a screenshot about that?

The other things been modified (still not committed).

Thanks for the review!

federiko_’s picture

StatusFileSize
new47.15 KB
new43.98 KB

I had disabled the module.
After reactivating edit tabs disappeared.
Clearing menu cache seems to have resolved the problem.
Here are the screenshots I took before.

capynet’s picture

Status: Needs work » Needs review

Fixed issues of #7 comment. I can not reproduce some issues, but seems cleaning cache solves the problem (#10 comment).

kscheirer’s picture

Status: Needs review » Postponed (maintainer needs more info)

Similar modules though they only have D6 versions:
https://drupal.org/project/account_profile - works with content_profile
http://drupal.org/project/onepageprofile - works with d6 core profile - and yours is called profile2_one_page

There does not seem to be a version for profile2. However, since profile2 is a direct descendant of Content Profile, I think you should try to join forces with Account Profile. Or do I have that reversed? I never remember which way it went. Does your module have other differences?

We prefer collaboration over competition, therefore we want to prevent having duplicating modules on drupal.org. If the differences between these modules are not too fundamental for patching the existing one, we would love to see you joining forces and concentrate all power on enhancing one module. (If the existing module is abandoned, please think about taking it over).

----
Top Shelf Modules - Enterprise modules from the community for the community.

capynet’s picture

Status: Postponed (maintainer needs more info) » Needs review

I understand your point. Since Profile2 is conceptually a different approach of what a profile is, (against profile concept in D6 and earlier) I preferred make an independent module.

capynet’s picture

Ok I'm contacted with Account Profile's owner to ask contribute the code.

kscheirer’s picture

Status: Needs review » Postponed (maintainer needs more info)

Thanks capynet! If that fails for whatever reason please get back to us and set this back to "needs review".

kenorb’s picture

I've added capynet as maintainer of Account Profile as the modules have similar approaches.

capynet’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

kenorb thank you!

Close this issue.

capynet’s picture

Issue summary: View changes

changed branch

dineshw’s picture

Issue summary: View changes

So should someone prefer Account Profile Module
to achieve what is mentioned in issue.

avpaderno’s picture

Status: Closed (duplicate) » Closed (won't fix)