Co-Authors Plus
[resolved] delete_user action causes Fatal error (5 posts)

  1. fuchsws
    Posted 1 year ago #

    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?


  2. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 1 year ago #

    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?

  3. fuchsws
    Posted 1 year ago #

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

  4. jorgitobg
    Posted 1 year ago #


    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?


  5. jorgitobg
    Posted 1 year ago #

    Any help please?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Co-Authors Plus
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic