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


Reply


26 Posts   5555 Views

Avatar
James Bolitho

Community Member, 33 Posts

21 July 2011 at 8:48pm

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

Avatar
MarijnKampf

Community Member, 164 Posts

21 July 2011 at 10:03pm

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.

Avatar
James Bolitho

Community Member, 33 Posts

21 July 2011 at 10:47pm

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.

Avatar
James Bolitho

Community Member, 33 Posts

22 July 2011 at 6:24am

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?

Avatar
MarijnKampf

Community Member, 164 Posts

22 July 2011 at 7:59pm

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.

Avatar
James Bolitho

Community Member, 33 Posts

23 July 2011 at 2:22am

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.

Avatar
MarijnKampf

Community Member, 164 Posts

23 July 2011 at 3:24am

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.

Avatar
swaiba

Forum Moderator, 1804 Posts

23 July 2011 at 3:46am

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/