I describe my use case:
"I need diferent profiles bound to each user role. This is supported by content_profile, simply assigning several types as cont_profile and playing with permissions, but account_profile only supports one of them selectable in an admin section"
After some research, I modified this in two places:
$profile = variable_get('account_profile_main_profile', key(content_profile_get_types('names'))); // get main profile name
if (is_numeric(arg(1)) && $user = user_load(arg(1))) {
foreach(content_profile_get_types('names') as $profile_type=>$profile_name) {
if (content_profile_page_access($profile_type, $user)) {
$profile = $profile_type;
break;
}
}
}
the meaning is: give me the FIRST type acting as content_profile that user HAS ACCESS to
If you need me to post it as a patch, I think I should change more things because it's a change in the philosophy of account_profile, I see this as an enhanced support of content_profile. If you need my help, please let me know
Anyway, thank you very much, this module is the culmination of what content_profile pretended to do
Hwangar
Spain
Comments
Comment #1
clashar commentedsubscribe
Comment #2
christopherreay commentedsubscribe - Any word on Drupal 7 for this?
Comment #3
open social commentedthanks for the fix
Comment #4
mrfelton commentedWhat exactly denotes what the 'First' content profile is? Surely this needs to be configurable - a way to order the content profiles to specify order of priority. In my use case, the order of priority would actually need to be what Site the user is on when editing their profile, but thats probably out scope for this. Perhaps there should be a hook that gets fired to let other modules intervene and help decide which profile should be integrated.
Comment #5
delykj commentedsubscribe
Comment #6
kenorb commented