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

Member profiles module works, but Admin can't add members anymore

Go to End

2 Posts   986 Views


Community Member, 267 Posts

27 January 2012 at 10:45am

Edited: 27/01/2012 10:46am


i have memberprofiles installed, and everything works.. on the front-end users can add themselfs.. emails get send etc..
but when logged in as admin, you can't add members in the CMS any more!

This has got to do with the following code in MemberExtraStatistics.php
(this code extends Members and sends out the emails)


class MemberExtraStatistics extends DataObjectDecorator {

	function onBeforeWrite() {

        if (!$this->owner->exists()) {
            $email = new Email();
            $data = $this->owner->getAllFields();

            $toAddress = Email::getAdminEmail();

            $email->setSubject('Member activation required');



The error in the CMS when adding a member:

[Notice] Undefined index: Email
POST /myproject/admin/security/EditForm/field/Members/AddForm?SecurityID=2a1cfb34e4d0bcef411795b803e31110a600d4dc

Line 315 in /home/myproject/public_html/myproject/mysite/code/MemberExtraStatistics.php

Line 315:


I think this script is trying to use the admin email (logged-in account/email) instead of the email entered in the form in the CMS.

Is this correct? and how should i rewrite this?

Thanks in advance!


Community Member, 267 Posts

27 January 2012 at 11:20am

replace line 315 for


and everything works!

credits for Zauberfisch