Today i need a user reference on profile but cck solution dont attend me so a build a patch to do it on with profile module.

If some one have interesting on it i can port to drupal 6 too.

thanks

CommentFileSizeAuthor
profile.module.patch3.12 KBpedrofaria

Comments

deviantintegral’s picture

Version: 5.15 » 7.x-dev
Status: Needs review » Needs work

I don't actually support this feature, but I had the time to do a review and figured I'd spend it on a first-time core contributor :)

New features go in the development version of Drupal. When they are committed to that version, they may be backported, though typically only bug fixes go in released versions, not new features.

Comments from reading the patch file:

$rs = db_query("SELECT u.uid, u.name FROM {users_roles} r LEFT JOIN {users} u ON u.uid = r.uid WHERE r.rid IN( %s )", join(',', $roles));

I'm not sure if this is valid, as %s will want a string, meaning it should be wrapped in single quotes. But, the value is not actually a string. I think you'd have to rework that query to be "proper".

You have a few commented lines of code in the patch which should be removed.

As for the feature itself, it's probably redundant in D7 now that fields are in core and can be attached to users. And, as a new feature, it's unlikely to go into Drupal 5 or 6. My suggestion would be to see if you can do this from a contrib module or to write up a handbook page on how to do this, with the patch attached.

pedrofaria’s picture

Thanks for your time... i really appreciate it.

I imagined that it can't enter as new feature on D5 or 6...

I will review the code as you said and port to drupal 6 too... maybe the handbook with patches is the best solution to it...

Thanks again...

deviantintegral’s picture

Status: Needs work » Closed (won't fix)
gabs77’s picture

Hi,

I work with drupal 6.16 and i search to use profile field in User reference.
I use Custom formatted to create a different format for the field in view.
But I don't have access fields profile.

Perhaps your patch is a solution ?

Regards.

deviantintegral’s picture

This patch isn't what you're looking for - check the issue queue for CCK or Views instead.