Jump to:

10994 Posts in 2728 Topics by 1819 members

All other Modules

SilverStripe Forums » All other Modules » [newsletter] - error while duplicate user

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 889 Views
  • sebastiankozub
    Avatar
    Community Member
    40 Posts

    [newsletter] - error while duplicate user Link to this post

    Hi, I have standard newsletter installed and when somebody want to add his e-mail second time and he's now in database I get error instead of nice information
    How can I change it to have page that inform user that he's in database?

    Source

    618             'Member',
    619             sprintf(
    620                "\"%s\" = '%s' %s",
    621                $identifierField,
    622                Convert::raw2sql($this->$identifierField),
    623                $idClause
    624             )
    625          );
    626          if($existingRecord) {
    627             throw new ValidationException(new ValidationResult(false, sprintf(
    628                _t(
    629                   'Member.ValidationIdentifierFailed',
    630                   'Can\'t overwrite existing member #%d with identical identifier (%s = %s))',
    631                   PR_MEDIUM,
    632                   'The values in brackets show a fieldname mapped to a value, usually denoting an existing email address'
    633                ),

    Trace

    * Member->onBeforeWrite()
    Line 936 of DataObject.php
    * DataObject->write()
    Line 238 of SubscriptionPage.php
    * SubscriptionPage_Controller->doSubscribe(Array,Form,SS_HTTPRequest)
    Line 300 of Form.php
    * Form->httpSubmission(SS_HTTPRequest)
    Line 137 of RequestHandler.php
    * RequestHandler->handleRequest(SS_HTTPRequest)
    Line 155 of RequestHandler.php
    * RequestHandler->handleRequest(SS_HTTPRequest)
    Line 147 of Controller.php
    * Controller->handleRequest(SS_HTTPRequest)
    Line 199 of ContentController.php
    * ContentController->handleRequest(SS_HTTPRequest)
    Line 67 of ModelAsController.php
    * ModelAsController->handleRequest(SS_HTTPRequest)
    Line 281 of Director.php
    * Director::handleRequest(SS_HTTPRequest,Session)
    Line 124 of Director.php
    * Director::direct(/newsletter/Form)
    Line 127 of main.php

  • nimeso
    Avatar
    Community Member
    17 Posts

    Re: [newsletter] - error while duplicate user Link to this post

    I have the same but different issue...

    I have Wills Facebook Connect Module, and if I log in as test@test.com using 'standard' login form I successfully login.

    But then if I click the Facebook button and type a different email (SS & facebook vaild) eg vaildfb@vaildfb.com my page refreshes and freaks out cos it's a different vaild user? . Same error... What I want is it to reload/login as new facebook user?

    I don't want to hack FaceBookMember.php or Member.php surely?

    Please help drivin me crazy man!

    Jamie

  • CHD
    Avatar
    Community Member
    218 Posts

    Re: [newsletter] - error while duplicate user Link to this post

    this may come in handy for anybody who wants to easily include forms in a sidebar or any other area of the site, without controlling a hidden page:

    http://www.clickheredigital.co.uk/blog/how-to-include-a-silverstripe-form-on-any-every-page/

    it also has an easy "query database for existing member" function that isn't covered in the form tutorials...

    889 Views
Page: 1
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.