Hi Patrick,

It’s easy for you to customize your wiki to make that field required by editing 
the XWiki.Registration page.

Actually I’ve just checked quickly that page and I see:

  ## The email address field, regex checked with an email pattern. Mandatory if 
registration uses email verification
  #set($field =
    {'name' : 'register_email',
      'label' : $services.localization.render('core.register.email'),
      'params' : {
        'type' : 'text',
        'size' : '60'
      },
      'validate' : {
        'regex' : {
          'pattern' : '/^([^@\s]+)@((?:[-a-zA-Z0-9]+\.)+[a-zA-Z]{2,})$/',
          'failureMessage' : 
$services.localization.render('xe.admin.registration.invalidEmail')
        }
      }
    })
  #if($xwiki.getXWikiPreferenceAsInt('use_email_verification', 0) == 1)
    #set($field.validate.mandatory = {'failureMessage' : 
$services.localization.render('core.validation.required.message')})
  #end

So this indicates that the mail field is actually mandatory when mail 
verification registration is enabled… thus it should work normally… Not sure 
why it doesn’t in your case. You should open a jira issue explaining how to 
reproduce it (your setup).

Now to make the email field mandatory is simple. Change the content from above 
with:

  #set($field =
    {'name' : 'register_email',
      'label' : $services.localization.render('core.register.email'),
      'params' : {
        'type' : 'text',
        'size' : '60'
      },
      'validate' : {
        'mandatory' : {
          'failureMessage' : 'Email is mandatory'
        },
        'regex' : {
          'pattern' : '/^([^@\s]+)@((?:[-a-zA-Z0-9]+\.)+[a-zA-Z]{2,})$/',
          'failureMessage' : 
$services.localization.render('xe.admin.registration.invalidEmail')
        }
      }
    })

Make sure you save with a user having programming rights.

Thanks
-Vincent


On 25 Sep 2014 at 22:30:02, Patrick Masson 
([email protected](mailto:[email protected])) wrote:

> We've received a few questions from new users trying to register for the
> wiki.
>  
> The registration form does not require an email to be entered in the
> email field. If it is not supplied, and the form submitted, the newly
> registered user cannot log in as they need a validation key that was
> emailed to them (but remember, no email entered).
>  
> Here is a demo: http://youtu.be/xk0t7Hf3rQY
>  
> Is this a local issue that I can fix in the admin panels (we do want to
> confirm users email), or is this an issue with the registration form itself?
>  
> Thanks,
> Patrick
>  
> --
> || | | |||| || || | |||| ||| | |||
> Patrick Masson
> General Manager, Director & Secretary to the Board
> Open Source Initiative
> 855 El Camino Real, Ste 13A, #270
> Palo Alto, CA 94301
> United States
> OSI Phone: (415) 857-5398
> Direct Phone: (970) 4MASSON
> Skype: massonpj
> Em: [email protected]  
> Ws: www.opensource.org  
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/users

_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to