This patch adds some hooks that would allow using user data from other modules besides profile, if those modules implement the hooks.

Comments

john morahan’s picture

StatusFileSize
new3.02 KB

Wrong patch. Sorry. Try this one.

kewlguy’s picture

Version: 5.x-1.x-dev » 6.x-1.3

Any chance that there would be a 6.X version of this patch?

I wonder if It might solve an issue I have with mapping the vcard fields to the profile fields when the vCard modules 'auto creates' the fields for the 'content profile'.

I would love to be able to use cck and locations with the vcard module. The way I am thinking is that if the module could hook into the location module and some cck fields I would be on my way. I'm just no coder so I am a little helpless in this area.

michaelpporter’s picture

While we have not added location yet we just posted a module for this http://drupal.org/project/cck_vcard not meant to step on this modules function.

sanduhrs’s picture

Version: 6.x-1.3 » 7.x-1.x-dev
Status: Needs review » Fixed

You may now alter the raw vcard data by implementing hook_vcard_data_alter($data).
This is available in both, D6 and D7.

dman’s picture

hook_vcard_data_alter($data)
NICE.
... but ...
there is not quite enough detail to go on there, it gives us the processed vcard fields But hides the actual account information form us!
I can't add anything to it if I still don't know which user account I'm dealing with :-}

How about

-  drupal_alter('vcard_data', $vcard_raw[$account->uid]);
+  drupal_alter('vcard_data', $vcard_raw[$account->uid], $account);

So now I can add things (like 'role' based on the Drupal 'role') based on the $account details

dman’s picture

Status: Fixed » Needs review
StatusFileSize
new587 bytes

Like this? Please?

sanduhrs’s picture

Status: Needs review » Fixed

Well, of course you are right!
Commited to DRUPAL-6--1, DRUPAL-7--1.
Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.