Exclude current user from wp_dropdown_users list (1 post)

  1. gunawp
    Posted 1 year ago #

    I am creating a plugin. Now I am listing all the users in a form in my plugin. I need to display all user except current user who is logged in. How to accomplish this task?

    <?php wp_dropdown_users(array('name' => 'user', 'exclude' => 'get_current_user_id( )','show' => 'user_login')); ?>

    The above code didn't fulfill my requirement.

Topic Closed

This topic has been closed to new replies.

About this Topic