I need to make sure a core profile field is unique and no other user has the same value for that field. This does that with the cck fields but not the core profile fields. Can you add this funtionality to this module or tell me how to accomplish this?
Comments
Comment #1
arithmetric commentedThanks for your interest in the Unique Fields module.
At this point, it is beyond the scope of this module to support Drupal core user profile fields. The core design of this module is for processing nodes, and Drupal's user profile fields are stored with the user data.
If you were using Node Profile/Content Profile (or in another way, were using nodes with CCK fields to store this profile data), then you could use the Unique Fields module to impose a uniqueness constraint on these fields.
To implement a uniqueness requirement for Drupal profile fields, you would probably use hook_user() to add extra validation (comparing the submitted value against other existing values) for the profile fields you want to be unique.
Comment #2
prdsp commentedThe real problem that I am having is that I can't get the content profile cck field tokens to show up as replacement patterns in the user path settings of pathauto. I was able to get the core user profile tokens to show up in the replacement patterns using the tokens patch located here. http://drupal.org/node/125640
However, as stated above the core profile fields don't work with the unique field module.
What I'm tying to do is have the user be able to submit a unique field to determine what the url for there profile page should be.
I.E.
domainname.com/(unique_field_token_replacement)
I'm not a coder so if anyone out there is reading this and can provide me with the php code that I need to make this work or can let me know of a way to accomplish what I am tying to achieve it would be greatly appreciated.