bp_members_get_user_nicename( int $user_id )

Return the user_nicename for a user based on their user_id.

Description Description

This should be used for linking to user profiles and anywhere else a sanitized and unique slug to a user is needed.

Top ↑

Parameters Parameters


(int) (Required) User ID to check.

Top ↑

Return Return

(string) The username of the matched user or an empty string if no user is found.

Source Source

File: bp-members/bp-members-functions.php

function bp_members_get_user_nicename( $user_id ) {
	 * Filters the user_nicename based on originally provided user ID.
	 * @since 1.5.0
	 * @param string $username User nice name determined by user ID.
	return apply_filters( 'bp_members_get_user_nicename', get_the_author_meta( 'nicename', $user_id ) );

Top ↑

Changelog Changelog

Version Description
1.5.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.