Jump to:

23360 Posts in 18124 Topics by 2862 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: 5083 Views
  • James Bolitho
    Avatar
    Community Member
    33 Posts

    Re: email address validation Link to this post

    Hi Marijn,

    Wow thanks for the quick response. The other error I get is as follows:

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

    Line 152 in /sapphire/core/ViewableData.php
    Source

    143    }
    144    
    145    /**
    146     * Get the value of a field on this object. This should be overloaded in child classes.
    147     *
    148     * @param string $field
    149     * @return mixed
    150     */
    151    public function getField($field) {
    152       return $this->$field;
    153    }
    154    
    155    /**
    156     * Set a field on this object. This should be overloaded in child classes.
    157     *
    158     * @param string $field

    Trace

    ViewableData->getField(URLSegment)
    Line 114 of ViewableData.php
    ViewableData->__get(URLSegment)
    Line 109 of ContentController.php
    ContentController->init()
    Line 69 of Page.php
    Page_Controller->init()
    Line 136 of Controller.php
    Controller->handleRequest(SS_HTTPRequest)
    Line 199 of ContentController.php
    ContentController->handleRequest(SS_HTTPRequest)
    Line 282 of Director.php
    Director::handleRequest(SS_HTTPRequest,Session)
    Line 125 of Director.php
    Director::direct(/verification/validate/*******MyEmailAddress********/280571df9192251129dd64f547746b2a)
    Line 127 of main.php

    Cheers,

    Jim

  • MarijnKampf
    Avatar
    Community Member
    164 Posts

    Re: email address validation Link to this post

    Not quite sure why the error occurs. Have you made any changes to the default configuration of the emailverifiedmember _config.php?

    Or possibly have you extended the Member class and used a variable called URLSegment in your extended class? I've renamed the URLSegment variable to ModuleURLSegment on github to rule this out.

  • James Bolitho
    Avatar
    Community Member
    33 Posts

    Re: email address validation Link to this post

    I am still getting the error but what I will do is test this out on a clean Silverstripe install and see if this conflict is being caused by one of the other modules I have installed on the current site and then report back my findings.

    Thanks for your help so far.

  • James Bolitho
    Avatar
    Community Member
    33 Posts

    Re: email address validation Link to this post

    I have tested on a clean install of Silverstripe and I am not receiving the errors I received earlier so this means that I need to go back and check my code and modules on the other site to see where the conflict is but I have also noticed that I am receiving the same email verification message three times which is a bit odd. Any Ideas what could be causing this?

  • MarijnKampf
    Avatar
    Community Member
    164 Posts

    Re: email address validation Link to this post

    Jim, the latest update on github should have fixed the multiple emails - SilverStripe calls the onAfterWrite multiple times there is now a check to see whether the email has been sent before. Please ensure to do a /dev/build after updating.

  • James Bolitho
    Avatar
    Community Member
    33 Posts

    Re: email address validation Link to this post

    Marijn, thanks for the update, that fixed the problem with multiple emails being sent. I also found out what is causing the errors I was experiencing when clicking on the email links. In my config file I changed the following setting for Director::set_environment_type to live rather than dev and it now works as far as I have tested. Thanks again for the help with this.

  • MarijnKampf
    Avatar
    Community Member
    164 Posts

    Re: email address validation Link to this post

    Hi Jim, changing from dev to live only suppresses the notice messages as only errors are displayed. Glad to hear you found a working solution though.

  • swaiba
    Avatar
    Forum Moderator
    1784 Posts

    Re: email address validation Link to this post

    Sorry to hijack in here...

    There is of course a very simple solution to this... do not allow the users to create their password in the registration form.

    Instead send them the link to the reset password link upon registration so they use the core system to set their password only.
    (or you could generate them an initial password in the email, but I also like to avoid having passwords in emails for security reasons)

    I've chosen this (even though some people say it's not as good for the user experience) because it means ONLY the core silverstripe security is used and is therefore much more secure and when I put it like that I've never had someone say - no I want the less secure method. Security is important.

    oh since I'm going on about security... http://www.ssbits.com/snippets/2010/using-a-password-validator/

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