Getting author page slug from get_users() or get_userdata() functions

You can retrieve the author page URL for any user by their user ID using the WordPress native function get_author_posts_url(). Combining this with get_users() to retrieve an array of users, you can create an author list in pretty much any way you like!

Below is an example of the usage of get_author_posts_url(), displaying a link to the author page for the currently logged in user:

$userid = get_current_user_id();
echo '<a href="' . get_author_posts_url( $userid ) . '">' . __( 'User profile', 'my_textdomain' ) . '</a>';