Currently, the validation for profile fields is not used on registration. The problem is that the $register variable in profile_get_fields is not used.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner’s picture

Missing patch file.

Mh i cannot upload one.

Index: modules/profile/profile.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/profile/profile.module,v
retrieving revision 1.236.2.3
diff -u -p -r1.236.2.3 profile.module
--- modules/profile/profile.module	12 Jan 2009 10:09:19 -0000	1.236.2.3
+++ modules/profile/profile.module	1 Mar 2010 23:09:04 -0000
@@ -431,7 +431,8 @@ function _profile_update_user_fields($fi
 }
 
 function profile_validate_profile($edit, $category) {
-  $result = _profile_get_fields($category);
+  $register = $edit['form_id'] == 'user_register';
+  $result = _profile_get_fields($category, $register);
   while ($field = db_fetch_object($result)) {
     if ($edit[$field->name]) {
       if ($field->type == 'url') {
jhodgdon’s picture

FileSize
755 bytes

Apparently dereine is having trouble attaching a patch. Here is the above patch from #1...

Status: Needs review » Needs work

The last submitted patch, 729672-for-dereine.patch, failed testing.

jhodgdon’s picture

Status: Needs work » Needs review

Ignore the test failure, the testing bot is not working right now for D6. Issue has been filed.
Patch still needs to be reviewed.

seemas’s picture

jhodgdon’s picture

Issue tags: +Novice

Needs a re-roll... probably a good novice project at this point...

xjm’s picture

Status: Needs review » Needs work

Marking needs work since it needs to be rerolled.

chertzog’s picture

Status: Needs work » Needs review
FileSize
587 bytes

Rerolled.

Nisith’s picture

Issue tags: -Novice

#2: 729672-for-dereine.patch queued for re-testing.

Status: Needs review » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.