Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

email address validation


Go to End
Reply


26 Posts   5386 Views

Avatar
JDonth

Community Member, 2 Posts

30 January 2010 at 10:34am

Since the "member" sub-system uses the email address as the member identifier, I need to make sure the person registering is the "owner" of that email address. How do I do that within SS?

On other systems, the user is sent a confirmation email to verify that they are in fact the owner of that email address but I don't see that capability in SS.

It looks to me like I could register as "billg@microsoft.com" and if a "real" billg@microsoft.com wanted to register he would be unable to do so unless an administrator manually deleted the bogus member record.

I'm new to this so I may be missing something obvious and if so apologize in advance.

~Joe

Avatar
Willr

Forum Moderator, 5513 Posts

30 January 2010 at 5:01pm

Hey Joe and Welcome to the Forums.

You're correct, no built in way to do this in SS either in the core or any of the major modules. It would be quite useful to have, maybe not in the 'core' as such but as something in the forum module / documentation on how to do it. To get something like that working would involve tweaking the default member object, adding a hook when you create the member to send an email (both these member changes you could use a decorator for), and the functionality of approving a member when they click the link. Nothing super hard but it does touch on quite a few things so you might want to cover the tutorials and get a decent grasp on things before you attempt it.

Some docs that may help

http://doc.silverstripe.org/doku.php?id=dataobjectdecorator
http://doc.silverstripe.org/doku.php?id=email

Avatar
JDonth

Community Member, 2 Posts

31 January 2010 at 5:07am

Willr,

Thank you for the documentation suggestions.

I am *very* new to SS. I just finished reading the Schommer and Broschart book, SilverStripe, and am starting pass 2 of the book with specific features I need in mind for a project that I want to write with SS. -- thus the member validation question.

If I get some code working, I'll pass it along to the group.

In the mean time if anyone else has any thoughts on this, please let me know. I'm pretty sure this capability falls within best-practices for web site member authentication.

Avatar
timcole

Community Member, 32 Posts

5 March 2010 at 4:51am

Hi - I've done this for a project, it's not TOO hard when you know how / where to look. My code is pretty specific to my project, but if you are still stuck let me know and I will be happy to help you out.

Avatar
drye

Community Member, 49 Posts

1 September 2010 at 4:37pm

@timcole I'm interested in how you did this. I'm looking to replicate a similar functionality to the forums registration, but before adding the user I want to send a validation email with a link and code in it. Clicking the link finalizes their registration. If they try to login I'd like it to say "E-mail validation required, enter code here or request new code"

Something like that, I thought for sure there would be a module for this, it seems so common. I believe I will release this as a module if I end up coming up with a robust solution.

Thank you for any help you can share.

Avatar
MarijnKampf

Community Member, 164 Posts

11 June 2011 at 2:43am

For what it's worth, I was looking for the same functionality and created a [url=http://www.exadium.com/tools/silverstripe/emailverifiedmember/]EmailVerifiedMember module[/url].

Avatar
James Bolitho

Community Member, 33 Posts

21 July 2011 at 10:24am

Edited: 21/07/2011 10:25am

Hi MarijnKampf,

I tried your Email Verified Member Module which installed fine but I am having some problems. When trying to register through one of my custom registration forms I receive the following error:

[Notice] Trying to get property of non-object
POST /registration/RegistrationForm

Line 61 in /EmailVerifiedMember/code/VerifyEmailRole.php

Also when clicking on the email validation links I receive the following error:

[Notice] Undefined property: VerifyEmail_Controller::$URLSegment
GET /verification/validate/*******MyEmailAddress********/f7529faeac457035c4f6c637cd854950

Line 152 in /sapphire/core/ViewableData.php

Just wondered if you could point me in the right direction.

Cheers,

Jim

Avatar
MarijnKampf

Community Member, 164 Posts

21 July 2011 at 6:22pm

Hi Jim,

I've fixed the first notice in the latest version on github. Can you post the full error message you're getting for the second one, as I can't reproduce that one?

Cheers,

Marijn.

Go to Top