Skip to main content
added 482 characters in body
Source Link
saeed shabani
  • 153
  • 1
  • 2
  • 12

I want to check if special user id is logged in WordPress. i know we have a function name is_user_logged_in() but we can't change the id of user logged in, in this function.

I need a function like this:

is_special_user_logged_in();

and check it like this:

if ( is_special_user_logged_in() ){ echo 'special user is online'; }

i can get the user id in one of bbpress file (loop-single-reply.php) by this code. get_post_field( 'post_author', bbp_get_reply_id() ); .Now i want to check if this user id logged in wordpress show a text like "this user is online". Note that i want to check it in another user logged in WordPress. it's mean if "USER A" logged in wordpress show a text to "USER B" that "USER A" is now logged in wordpress.

finally want to inform USER A about login status of USER B

I want to check if special user id is logged in WordPress. i know we have a function name is_user_logged_in() but we can't change the id of user logged in, in this function.

I need a function like this:

is_special_user_logged_in();

and check it like this:

if ( is_special_user_logged_in() ){ echo 'special user is online'; }

I want to check if special user id is logged in WordPress. i know we have a function name is_user_logged_in() but we can't change the id of user logged in, in this function.

I need a function like this:

is_special_user_logged_in();

and check it like this:

if ( is_special_user_logged_in() ){ echo 'special user is online'; }

i can get the user id in one of bbpress file (loop-single-reply.php) by this code. get_post_field( 'post_author', bbp_get_reply_id() ); .Now i want to check if this user id logged in wordpress show a text like "this user is online". Note that i want to check it in another user logged in WordPress. it's mean if "USER A" logged in wordpress show a text to "USER B" that "USER A" is now logged in wordpress.

finally want to inform USER A about login status of USER B

edited title
Link
fuxia
  • 107.1k
  • 38
  • 255
  • 459

show text If special user is logged in wordpress

Source Link
saeed shabani
  • 153
  • 1
  • 2
  • 12

show text If special user is logged in wordpress

I want to check if special user id is logged in WordPress. i know we have a function name is_user_logged_in() but we can't change the id of user logged in, in this function.

I need a function like this:

is_special_user_logged_in();

and check it like this:

if ( is_special_user_logged_in() ){ echo 'special user is online'; }