Support » Plugin: WP Approve User » Approve users through code?

  • Resolved mozboz

    (@mozboz)


    Hi, we’re using your plugin and it’s working great.

    We have an application now where we want to be able to approve users through code in another plugin in some cases, can you recommend the best way to do this? I’ve had a look at the code but it seems like all the methods that do approval are expecting to be called from the admin UI and do a bunch of checks that would fail if called from another plugin (esp. outside of the admin UI)

    Any help appreciated 🙂

    m

Viewing 1 replies (of 1 total)
  • Plugin Author Konstantin Obenland

    (@obenland)

    Sure, running update_user_meta( $user_id, 'wp-approve-user', true ); with the user id as the first argument will mark that user as approved.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.