If you are using this on author pages or in loop then you can simply use this.
echo the_author_meta( 'user_registered' );
This will output registration date of author.
So your function will become.
if ( is_author() ) {
$curauth = ( isset($_GET['author_name']) ) ? get_user_by( 'slug', $author_name ) : get_userdata( intval($author) );
$date = the_author_meta( 'user_registered' );
}
Related Posts:
- How to get userid at wp_logout action hook?
- alphabetically order role drop-down selection in dashboard
- WordPress auto login after registration not working
- Change the author slug from nickname to ID
- How to let contributors to create a new revision(draft) editing their published posts
- Retrieve all users from wordpress database via REST/JSON API
- Is there a way to set a user profile to Draft?
- Wp_User_Query not sorting by meta key
- How to use hyperdb to separate and share a user dataset between wordpress installs?
- \WP_User Object | What’s the Difference Between {caps} and {allcaps}?
- pre_user_query meta_query admin user list
- Any reason to be concerned by a wave of “zombie” blog signups?
- Return ID of authors who have at least one post
- Migrating users from .com to .org?
- Get total number of authors on the site
- How to migrate wordpress users from one blog to another
- Find out when a user was created and display varied content depending on time since creation
- Creating a Front-end based User Search
- How can I link users across multiple subdomains?
- Create user with author role but no login information
- Importing Existing Users with Passwords
- How to add user meta for all users
- Is there any function available to echo current user’s profile url?
- How can I allow users to sign up but prevent them from accessing the WordPress backend?
- Get User Role by ID not working
- Add user data to table when user is created?
- Why wordpress showe “admin is editing…” whoever edits?
- Restricted registrations or removing the ability to edit your password/email
- Limit amout of sessions on user-by-user basis?
- Redirect user to login before viewing custom post
- Remove admin menu links for multiple users by email
- Use wp_update_user to update custom column in wp_users table
- Create a front user register/login/profile & logout without interfering with wp-login.php?
- Rest API code to get ID of current user not working: get_current_user_id() gives 0
- C# user_nicename and Display name blank
- How to filter users by last_name?
- WP users page doesn’t show users count by role
- Bulk lock users without email address?
- Failed login attempts
- Custom Query for count_user_posts function
- Does wordpress support natively the concept of logging-in users? (not admins, but users of the website)
- How to pull all the contributer users records and order by Designation (which is users meta data)?
- cannot get user_registered date from get_user_meta
- Delete Users without a First and Last Name
- Display video on homepage for users who have not logged in
- How to hide user profile fields based on the role of the viewed user?
- user_meta table in staging vs live site
- Customising “user ids” and add to ‘user’ panel in the admin area
- Add a sub menu page to the Users menu
- Get usermeta info from sql query
- Confirm Deletion not found
- Privilege to recover trashed posts
- One Click Access To Users Account In WordPress?
- how do I add role and capability after I create a new user
- How to use `wp_insert_user` & `wp_insert_post` simultaneously without `headers already sent` error?
- Need to exclude users with no posts from my contributors page
- Unexpected problems after importing WP data
- link variable to user
- Changing user of post by changing ‘post_author’ field in ‘wp_posts’ table not taking effect. Where is the real post author info kept?
- WordPress user role with create user capability?
- How to safely trigger password reset emails for thousands of users
- How to add extra field in profile page and show in myaccount?
- Perform multiple actions after wp_insert_user()
- My custom user metadata is only active for only admin but i want it to be active on all users especially customers
- How to get image path from id using SQL
- Update user role for expired membership
- wp_insert_user error
- How to remember which page the user was on before logout?
- SQL to set Display Name to First Name + Last Name
- Create users by importing from CSV, with User ID assigned from CSV
- Moving users from joomla to wordpress
- User Group Level Login
- Deleted users still able to login
- Hook into add_user_role and update based on new and removed roles
- Limit user description length in characters
- Auto approve new users if their username is included in a predefined list
- How to update user meta from php file?
- Check for empty username or password on login
- How do I tag every author in their posts that they have made previously
- How to create members?
- How to use url formatter with integer
- Show user details only
- add a Custom Columns to user
- Creating custom pages for new users automatically
- Output checkbox per user and save in plugin options
- Require confirmation of current user’s email before updating database and before send_email_change_email
- get_user_by asking for string while string is given
- Access level seems to have gone from admin to editor
- User email not being changed (cached?) until next page load (frontend)
- Limit roles displayed in users.php depending on custom role
- Fetching posts that match a User Profile setting
- Will mass deleting WP Users then reimporting CSV with the same userid break WP?
- Privacy in WordPress
- Shopping plugin with user groups [closed]
- how can i inform other users about new user registration? [closed]
- How to display Most Recently Read 10 Posts by a logged in user in wordpress
- 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?