WordPress has wp_get_current_user() function for getting the current (logged in) user, which you could use. If the returned WP_User object doesn’t have all the details you need, you can get either all or a specific user meta with get_user_meta(). For getting the user’s avatar, you could use get_avatar().
Have a look at the function docs for more details and their User Contributed Notes for some usage examples.
Related Posts:
- Generate email on meta value update
- Login page ERROR: Cookies are blocked due to unexpected output
- Separate registration and login for different roles
- How reduce wordpress login session timeout time?
- What is $interim_login?
- Login members using web services
- Synchronize WordPress user accounts across multiple domains and installations without using WordPress MU
- How do I change the logo on the login page?
- Why does WordPress hide the reset password key from the URL?
- How to fake a WordPress login?
- Integrate recaptcha and wp_signon – what is needed?
- Receiving “This content cannot be displayed in a frame” error on login page
- Getting “Cookies are blocked or not supported by your browser” on login page
- wp-login.php redirecting to HTTPS
- Display sortable User meta column in admin panel user’s page
- wp_login action hook not working
- Make wordpress admin failed login attempt return 401
- How do I extend auto logout on idle OR redirect inline popup
- Positioning the “Lost your password?” and “← Back to Site”
- Warning: Cannot modify header information – headers already sent
- Change to nofollow tag in wp-login.php
- Can’t stop hacker trying to get admin access in WordPress blog after trying many ways [closed]
- Validate Custom Login field
- How can I allow access to two user accounts using one login?
- How to set different cookies for logged in admin users and logged in non admin users?
- Is it possible a one click user registration with Facebook or Twitter (or other Social Networks)?
- How to shutdown wordpress login temporarily
- Restricting frontend acess based on user role otherwise redirect to login form
- Where is the query and form in wp-login.php?
- How to edit .htaccess to change site’s login url?
- How do I force “users must be registered and logged in” on subsites?
- redirect to homepage after login
- “lambda_xx” on all wordpress login pages
- How to allow only certain users to login
- Login redirects and query strings
- wp-admin folder, brute force, and password protection
- Allow Users Only Edit Their Profile?
- User Login System with File Delivery?
- Chrome 83 doesn’t connect WP login page after update from http to https on localhost
- WordPress login problem
- Skip login form wp-login.php when already logged in,
- Forcing SSL login, have to log in again from WP/BP-Admin Bar
- Call header and footer on wordpress default login page
- Notifications when someone is on the site
- How can I prevent anyone from logging into a WordPress failover site?
- How to password-protect everything except the logo
- Login Redirect Error – $user->roles
- WordPress login security
- Why isn’t the login page rate limited by default?
- how can redirect sign in and sign out link front-end page rather then wp-login .php in comment form in wordpress
- Can not login to wordpress site after resolving white screen of death
- Input sanitation
- Advice on redirect to lock site from unauthorized users
- Custom code needed to be executed on login and logout
- I renamed my server from http to https and now I can’t login
- Sending new registration meta values to admin by email
- Single Time Login HELP
- Allow Access to Home Page and Login Screen but Nothing Else (unless logged in)
- Error on WordPress Login
- Reloading page with a query string upon login for admins
- force login loophole
- Alert Message through email or phone(Message)
- Single sign on for multiple domains
- Custom login page problem!
- Looking up WordPress account information from Host or php files
- Get WordPress login functions without printing anything
- Multiple issues with Ajax login function due to browsers and cookies
- Allow login only for one account from one device
- URL with login details included for public members
- woocommerce store login not working at first time
- How show login popup to guest only and redirect logged in users?
- insert a WordPress page content into a pop up
- wp-login.php not working goes back to home page
- Will the same WordPress logins work after a site migration?
- Possible to create a login wall?
- All pages gives 404 except homepage and wp-login
- Check for $ _POST fields in a POST method form
- Styling WordPress login page – Can I change the markup on the login page?
- WP login admin name incorrect send to another page or site
- Custom login method appears to ignore auth_cookie_expiration
- User avatar-ACF fields
- Cannot login to wp-admin as redirect set to page not yet published
- Issue logging in from second computer
- Users can not login into wordpress website
- Cannot login to WP after force recovery
- redirect_to not Including Hashtag from URL
- Updating usermeta from login redirect to billing address
- Login problem with https
- Login / Register for specific pages
- WordPress login issue . Permission Problem
- How can I have customers log in using ONLY customer number? No password
- Problem with footer and login
- Remember me doesn’t work with www?
- Simplest way to create two private sections each with a common account
- Shared user database trick not working
- Login from Mobile Phone
- Can i login with only one account to different top leveled domain wordpress web sites?
- How login is possible, if I deny login page via nginx?
- Login and register by API
- Log in a user upon password reset?