Support » Plugin: Co-Authors Plus » delete_user action causes Fatal error

  • Resolved fuchsws


    I have another plugin which deletes pending users (registered users which haven’t confirmed their login yet).

    this plugin uses wp_delete_user() to remove users. however the co-author-plugin adds an action …

    // Action to reassign posts when a user is deleted
    add_action( 'delete_user',  array( $this, 'delete_user_action' ) );

    …. which causes an fatal error if triggered from another plugin:

    Fatal error: Call to undefined function get_user_by() in /path/to/wp-content/plugins/co-authors-plus/co-authors-plus.php on line 785

    any idea how to fix this?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Daniel Bachhuber


    Hand Built

    get_user_by() was introduced in WordPress 2.8. What version of WordPress are you using?

    Alternatively, is it possible your plugin isn’t calling /wp-includes/pluggable.php?

    well, including /wp-includes/pluggable.php solved it – thanks a lot!


    I have similar problem, I try to move author ID from old user to new one:

    SELECT ID FROM wp_users where display_name=’old_author_name’
    UPDATE wp_posts SET post_author=’new_auhtor_id’ WHERE

    But after this co-authors show no author….

    After this I try to delete old user from wordpress interface but still same problem.

    Any help please?


    Any help please?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘delete_user action causes Fatal error’ is closed to new replies.