Re: members slug
BP_MEMBERS_SLUG
is a constant defined – so if bp is initialized you can use that.
bp_core_get_user_domain( $user_id )
will return the member’s url – e.g. http://domain.com/ BP_MEMBERS_SLUG / username / – (also if BP_ENABLE_ROOT_PROFILES
is used or not)