WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form DB
Preventing duplicate e-mail addresses in database (10 posts)

  1. suite8
    Member
    Posted 1 year ago #

    Hey there,

    I've posted here before, but didn't quite get a solid response.

    I have CF7DB working excellently, the only problem is I don't want entries with the same e-mail address in my database.

    So if a user enters "john@gmail.com" and "john@gmail.com" is already in the table, I want the user to see an error message. (And of course the data will not be put in the database.)

    What's the easiest way to implement this?

    Thanks

    http://wordpress.org/extend/plugins/contact-form-7-to-database-extension/

  2. nosfan1019
    Member
    Posted 1 year ago #

    I have this exact same problem. Any good solution for this?

  3. Michael Simpson
    Member
    Plugin Author

    Posted 1 year ago #

    I'll see if I can work out an example and document it

  4. Michael Simpson
    Member
    Plugin Author

    Posted 1 year ago #

  5. wp_fun95
    Member
    Posted 1 year ago #

    Hi Michael,
    I have the same problem with duplicate emails. I have tried your suggested solution under: http://cfdbplugin.com/?page_id=904
    but I encounter a very specific problem due to the WP theme I use.
    I use the http://www.pagelines.com theme (free version) which does not allow changes in the functions.php as this is considered changing of core fields not supported by this theme.
    I asked support from them but they threw the ball to the plugin author's support. So, if you have any ideas how to cope with this, I would greatly appreciate.
    many thanks in advance
    BTW, I love your plugin, it is just great!

  6. Michael Simpson
    Member
    Plugin Author

    Posted 1 year ago #

    OK. Having to put the stuff in the theme's file is kind of dumb anyway. I don't know why WP doesn't have a better way. I'll think about how this might be done another way. I once asked the author of Shortcode Exec PHP if he would enhance his plugin to allow us to create filters in addition to short codes. But he didn't think that would be very useful...

  7. wp_fun95
    Member
    Posted 1 year ago #

    Hi Michael
    did you have some time to think about this problem?
    in the meantime I asked again support from the plugin who told me that editing the core files is not recommended (so they do not exclude this) and that any change would be lost in every update of the plugin.
    Any ideas of which are the core files referred to (definitely not the functions.php, since any change in it shuts down the theme and the whole site)?
    many thanks in advance for your help
    regards

  8. Michael Simpson
    Member
    Plugin Author

    Posted 1 year ago #

    I haven't tried this, but you might try this:
    - create a file cfdb-filters.php at the top of your WordPress installation
    - On the first line put:
    <?php
    - after that put in your code
    - In wp-config.php at the very end of the file add the line:
    require_once(ABSPATH . 'cfdb-filters.php');

    Let me know if it works.

  9. wp_fun95
    Member
    Posted 1 year ago #

    noop!
    It does not work!
    I added the line
    require_once(ABSPATH . 'cfdb-filters.php');
    at the end of the file wp-config.php which ends by the line:
    require_once(ABSPATH . 'wp-settings.php');

    This blocks everything, including my dashboard!.. no way to see anything
    I guess there is an incompatibility
    thanks a lot for your effort
    if you have any other idea, please let me know
    otherwise, I am afraid I have no other choice but change the theme!..

  10. Michael Simpson
    Member
    Plugin Author

    Posted 1 year ago #

    I use the http://www.pagelines.com theme (free version) which does not allow changes in the functions.php as this is considered changing of core fields not supported by this theme.

    I created a plugin where you can put your filter code as an alterative to putting it in functions.php. See: http://wordpress.org/extend/plugins/add-actions-and-filters/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic