Jump to:

23488 Posts in 18996 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » email address validation

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

Page: 1 2 3 4
Go to End
Author Topic: 5209 Views
  • JDonth
    Avatar
    Community Member
    2 Posts

    email address validation Link to this post

    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

  • Willr
    Avatar
    Forum Moderator
    5508 Posts

    Re: email address validation Link to this post

    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

  • JDonth
    Avatar
    Community Member
    2 Posts

    Re: email address validation Link to this post

    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.

  • timcole
    Avatar
    Community Member
    32 Posts

    Re: email address validation Link to this post

    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.

  • drye
    Avatar
    Community Member
    49 Posts

    Re: email address validation Link to this post

    @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.

  • MarijnKampf
    Avatar
    Community Member
    164 Posts

    Re: email address validation Link to this post

    For what it's worth, I was looking for the same functionality and created a EmailVerifiedMember module.

  • James Bolitho
    Avatar
    Community Member
    33 Posts

    Re: email address validation Link to this post

    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

  • MarijnKampf
    Avatar
    Community Member
    164 Posts

    Re: email address validation Link to this post

    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.

    5209 Views
Page: 1 2 3 4
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.