public function sendVerificationEmail()
    {
        if ($this->owner->exists()) {
            $controller = Injector::inst()->get("Users_Register_Controller");
            $subject = _t("Users.PleaseVerify", "Please verify your account");

            if (Users::config()->send_email_from) {
                $from = Users::config()->send_email_from;
            } else {
                $from = Email::config()->admin_email;
            }

            $email = Email::create();
            $email
                ->setFrom($from)
                ->setTo($this->owner->Email)
                ->setSubject($subject)
                ->setTemplate('UsersAccountVerification')
                ->populateTemplate(
                    ArrayData::create(
                        array(
                        "Link" => Controller::join_links(
                            $controller->AbsoluteLink("verify"),
                            $this->owner->ID,
                            $this->owner->VerificationCode
                        )
                        )
                    )
                );

            $email->send();

            return true;
        }

        return false;
    }
public function sendVerificationEmail()
    {
        if ($this->owner->exists()) {
            $controller = Injector::inst()->get("Users_Register_Controller");
            $subject = _t("Users.PleaseVerify", "Please verify your account");

            if (Users::config()->send_email_from) {
                $from = Users::config()->send_email_from;
            } else {
                $from = Email::config()->admin_email;
            }

            $email = Email::create();
            $email
                ->setFrom($from)
                ->setTo($this->owner->Email)
                ->setSubject($subject)
                ->setTemplate('UsersAccountVerification')
                ->populateTemplate(
                    ArrayData::create(
                        array(
                        "Link" => Controller::join_links(
                            $controller->AbsoluteLink("verify"),
                            $this->owner->ID,
                            $this->owner->VerificationCode
                        )
                        )
                    )
                );

            $email->send();

            return true;
        }

        return false;
    }
public function sendVerificationEmail ( ) { if ( $ this -> owner -> exists ( ) ) { $ controller = Injector :: inst ( ) -> get ( "Users_Register_Controller" ) ; $ subject = _t ( "Users.PleaseVerify" , "Please verify your account" ) ; if ( Users :: config ( ) -> send_email_from ) { $ from = Users :: config ( ) -> send_email_from ; } else { $ from = Email :: config ( ) -> admin_email ; } $ email = Email :: create ( ) ; $ email -> setFrom ( $ from ) -> setTo ( $ this -> owner -> Email ) -> setSubject ( $ subject ) -> setTemplate ( 'UsersAccountVerification' ) -> populateTemplate ( ArrayData :: create ( array ( "Link" => Controller :: join_links ( $ controller -> AbsoluteLink ( "verify" ) , $ this -> owner -> ID , $ this -> owner -> VerificationCode ) ) ) ) ; $ email -> send ( ) ; return true ; } return false ; }
Send a verification email to this user account

@return boolean
Send a verification email to this user account