Profile Aggregator

Component ID

1042100

Component name

Profile Aggregator

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Downloads

535

Component created

Component changed

Component body

Aggregates a user's profile nodes into one.

You have several different pieces of profile information about your users regarding to their work, eating habits, leisure time, and so on, all of which are considered to be semi-private (ie. may be hidden from eg. unauthenticated users). You may want to make (some part of) their profile data merged into one node per user, possibly with some considerably different layout and/or access control. You have set up different content types: 'work', 'eating', 'leisure', and 'public_profile', all of them set up with Content Profile module--but how to merge the first three into the fourth?

Here comes profile_aggregator.module handy. Just select the source profiles ('work', 'eating' and 'leisure'), select the target profile ('public_profile') with the appropriate format, and let the users update their pieces of profile information while having Drupal do the merge part of the work!

How this module works

If and when a user saves (adds, edits or deletes) a source profile node, profile_aggregator.module kicks in and checks if a target profile node exists for the given user, and takes care of it (either by inserting, updating or deleting it on behalf of the user). No need to worry about multi-language sites, either, as this module does its job only for the current language. Want to merge only part of the source data, and/or even with some special layout? No need to worry, either, since Drupal's theme layer is at your service here, too. Just have a clone of profile_aggregator-display-view.tpl.php for the theme of yours, and use the available variables:

  • $target_type: the target profile's machine name,
  • $uid: the user ID being used,
  • $source_node_types: array of the source node types' machine name,
  • $source_nodes: source node objects,
  • $rendered_nodes: source node objects rendered into HTML (as node_view() returns them),
  • $rendered_node_fields: multi-dimensional array of rendered fields of source nodes (first dimension being the source node's machine name, second dimension being the field's machine name), as drupal_render() returns them).

Dependency

You need to install and enable the Content Profile module--you do need some profiles to be able to aggregate them, don't you? :)

Development

Sponsored by young element and Finnovatec. Paid support and module development is from KYbest.