I am not sure exactly what you are asking for, but, if you want to target a specific user ID, just do something like:
// set special user id
$special_user_id = 5;
$current_user_id = get_current_user_id();
if ( $special_user_id == $current_user_id ){
echo 'special user is online';
}
You get the idea.
Related Posts:
- How to programatically change username (user_login)?
- How to restrict access to uploaded files?
- Allowing users to edit only their page and nobody else’s
- Disallowing Users of a Custom Role from Deleting or Adding Administrators?
- Hide Admin Menu for Specific User ID who has administrator Role
- Allowing an email as the username?
- Check if specific username is logged in
- Post list based on the user that is logged in
- Basic auth WordPress REST API dilemma
- Copy a user from one WordPress site to another
- Front end user meta options for users
- How to customize wp_signon()
- Can I create users that have access to *some* other users posts instead of all other users posts?
- Set default page for user account in admin
- Share user table from WP with Drupal
- Log all users out of all locations after 24 hours
- Hide everything on site for visitors except specific page IDs
- Managing Users and Creating Groups [closed]
- Upgrade Nightmare – No Posts, Permissions Issues and Can’t Create a new post
- How to disable a specific page for a specific user
- Allow user access to Dashboard only!
- Restrict access of admin uploads to certain logged-in users?
- wordpress user roles are not working
- Displaying different in-page content to cliente/admin
- Problem with automatic role change through cron job
- Reset Password policy
- How can I allow an User to publish only 5 posts per month?
- Where are $current_user->allcaps set?
- How do you manage your pages or functions that require logged-in users?
- Allow admins to login as other users
- Can I Create a Second Admin Level User Role?
- Delete a user from frontend
- Unique password to access a section site
- One Click Access To Users Account In WordPress?
- Using my own user table
- WordPress user role with create user capability?
- Update user role for expired membership
- How to use url formatter with integer
- Custom User Role: Can Edit Own Page, Cannot Create New
- WordPress install checking permissions of user id 0
- throttle/limit a logged in user’s http requests to specific page on a per day basis
- Allowing users to edit only their page and nobody else’s
- How to bulk change user role to “No role for this site”
- Restrict Access to the User Profile
- post acces for guests / unregistered users only
- Username has been exposed
- view and update form only for registered users
- Control Category of each user can post
- Limit user access to installing/configuring a plugin?
- determine active user browser at the same time
- MySQL query to list users who never signed in
- Wordpres password as plain text in email
- WordPress password as plain text in email
- Email user when password is reset by admin
- How to work around “that email address has already been used” error?
- How can I run a WP-CLI command as authenticated user?
- LEFT JOIN, INNER OUTER JOIN, LEFT OUTER JOIN is driving me crazy. Please help?
- Recover the user that have been deleted
- Check if user is online?
- How to check that if current user (ID) has posts or not
- How to get the Role Name of the current user? (WordPress)
- how to get recent registered author id?
- Is it possible to duplicate users on a new WordPress install?
- Why don’t first_name and last_name appear when you print_r the WP_User object?
- How to use search_columns in WP_User_Query?
- Send Email to Users after Deleting Account
- How to add local users to wordpress without email password?
- WP User Query fails when searching meta queries and search columns
- Call to undefined function wp_insert_user()
- *wpupdateuser* user_login in my WordPress database
- Users: List A to Z, for Users
- WPML Default Language User Meta [closed]
- Search Users base on meta_value & meta_key
- Fix permissions for users role
- How to stop redirect if user is already on correct page (Using Case Switch)
- How to activate the user search
- How change user type from contributor to author
- Preventing user enumeration: which logic is better?
- How can I do a url redirect to include a wordpress username?
- Allow Users to Modify Some Values of Assigned WordPress Pods [closed]
- Custom registration and pending approval
- Let logged-in users use radio buttons (yes and no) to exclude their author profile from the user listing
- Adding fields to the “Add New User” but the form data not saved into DB
- How would I restrict certain user levels from editing categories
- How can I set wp_dropdown_users so that it shows only authors?
- Restricting wordpress login sessions for a web app
- change user password REST API
- Use WP cookie to authentificate user on an external app
- Find count of WordPress users by role and search string for user name
- Users activity history
- How to destroy all user sessions via WP-CLI
- Designing a member area on my site
- Link to Authors blog posts
- Redirect based on log-in status per JavaScript
- Create users from frontend without password
- How to get user contact info
- Remove @gmail.com from WordPress username
- How to create a specific role to manage users
- How to track all users logged into a site?
- Export user data from Squirrly’s Starbox plugin?