Use wp_get_current_user
to get the current user (if any) then check or update the display name – update_user_meta
or wp_update_user
.
When you have a user, you’ll probably want to set a flag on the user’s meta for after they have filled out their name, or prompt otherwise.
How/where all this would go is really a more complex discussion than the root of getting and setting the data. Most likely this should be done via AJAX so the initial page is rendered, and the hello decorates it after the fact.
Related Posts:
- How to share cookies and sessions between domain and subdomain?
- Is it possible to transfer a WordPress session to a different browser via query string?
- Disconnect automattically after X minutes
- How to change WordPress cookies to be session-only
- Correct user session/cookie handling with external site connection in wordpress
- Looking to load a different template part on every load/refresh
- WordPress keep logged in after browser close
- Cookies vs. sessions
- How do I expire a PHP session after 30 minutes?
- PHP – setcookie(); not working
- How does REST API cookie authentication work in WP 4.7?
- Why does it say: ‘Cookies are blocked or not supported’?
- Place a cookie when a specific page has been viewed?
- How to detect a user that is not logged in
- How to change cookie name
- Should wordpress_logged_in cookie exist while logged out?
- WP_Http_Cookie destroys cookie value through urldecode()
- Display message once per session to users with a specific role
- Worpdress PHPSESSID / EU law
- Get restrict content by submitting Gravity Forms
- Website Loads Twice Unnecessarily
- Do I use cookies?
- How to transition cookies from .subdomain.domain.com to .domain.com with minimal impact on users?
- ERROR: Cookies are blocked or not supported by your browser
- What is cookie “U” from domain “.adsymptotic.com” found on the WordPress page? [closed]
- How to get login data (session) outside WordPress?
- Serving Cookies From A Different Domain or Sub-Domain
- How to fix samesite attribute in wordpress for chrome errors?
- Secure wordpress_logged_in cookie
- Random popup image per user with no repeat
- How to get session token of current user in wp_login hook?
- Deleting cookie to logout
- Show greetings on first time visitors?
- Unset a Cookie on Successful Gravity Forms form Submission [closed]
- Cookie only detected when visitor is logged in
- can we share user login in 2 wordpress installs in 2 subdomains on one server? [duplicate]
- background/font size change and remember
- WordPress cookies
- Modifying request $_COOKIE
- Block google maps from loading until user agrees to cookies with Elementor
- User Session and Stored Cookies not get removed
- Enable WordPress to share cookies between domain.com and sub.domain.com
- Check if user is logged in to site A when visiting site B
- Setting Cookies
- How I can share cookies from my dimain to subdomain?
- How to setup cookie free domain for wp-includes?
- WordPress authentication cookie and ajax calls
- Setting Cookies For Form Autofill
- What are your thoughts on overriding the PHP builtin setcookie() function to control whether or not WP creates cookies
- How to make use of Transient API as cookie
- Issues with set cookie
- Accept or deny cookies – how to?
- How to set a Cookie-Free Domain with WordPress?
- Is it possible to use cookie-free domains in WordPress?
- Passing cookies when using wp_remote_get
- Setting cookies in WP REST API requests
- Detect if authentication is set to “remember” a user being logged on
- Store value in cookie
- Set Short Automatic Logout Time for One User
- Session Cookie security questions
- WordPress Post Voting – Vote once per IP on entire site
- $_SESSION variable not saving on page refresh or new page
- wordpress can’t read a cookie?
- Page specific cookie
- will creating a static folder in the root directory serve the purpose of loading the static content from cookieless domain?
- Set cookie with taxonomy name
- Where is function to prevents non logged users access wp-admin?
- Best method to show modal only once
- Cookie with referral URL [closed]
- One time login on 2 different WordPress sites
- Cookie Details Requested
- Add session or cookie to remember last menu location
- Cookies in template
- Authorize subdomain to access and read user and admin cookies
- Cookie error. No possibility to define my cookie
- Codeless random token generation to pass into multiple tracking links in a single page load
- Favicon not loading until cookies are accepted?
- Set cookie parameters on wp site – PHP not working?
- can you help review CCCP (Conditional Cookie Content Post) and help to create a block?
- COOKIE_DOMAIN chaos
- Setup cookie on Chrome even without HTTPS
- PHP cookie control does not work correctly
- How can I get an updated cookie in header.php?
- Setting a Custom Cookie in WordPress only for Logged In Customer/User (non-admin)
- Login issue with subdomain installs
- Get WordPress logged in username from root domain when WP is installed in a subfolder
- Checking for cookies returns correct result only inside Elementor Editor
- How to save history in the client’s browser without login? [closed]
- Automatically Log Out UserX when visiting WooCommerceStore
- Entirely Cookieless WordPress?
- how to remember specific action/event for current user?
- When ever wordpress home page refreshes the code is not reading the cookie as set anymore
- Allow user to select location and then set cookie for location in WordPress
- Why isn’t my cookie setting in my function?
- WordPress wp-login.php cookie error (WordPress Version 4.2.9)
- Logged In cookie gets saved but not Auth cookie
- set cookies or let system know a user has been on site
- setcookie not working when defined with ‘/’ but working if not defined
- How to use Cookie or Session php for one page and just a password
- How to get the id dynamically to store cookies