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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

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

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

email address validation

Go to End

26 Posts   7977 Views

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

143 }
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 }
155 /**
156 * Set a field on this object. This should be overloaded in child classes.
157 *
158 * @param string $field


Line 114 of ViewableData.php
Line 109 of ContentController.php
Line 69 of Page.php
Line 136 of Controller.php
Line 199 of ContentController.php
Line 282 of Director.php
Line 125 of Director.php
Line 127 of main.php




Community Member, 176 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.

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.

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?


Community Member, 176 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.

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.


Community Member, 176 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.


Forum Moderator, 1899 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...