I didnt understand much of your question but as per I understood it.
There are wordpress functions to know if the user is logged in or not and to know the current page.
https://codex.wordpress.org/Function_Reference/is_user_logged_in
https://codex.wordpress.org/Function_Reference/is_page
Hope it helps
@Maruti Mohanty Thanks for the reply, I need to identify the page like this http://mysite.com/members/member-name/activity/following/
where, http://mysite.com/ = site
members = member page slug
member-name = displayed member personal page slug
activity = personal page activity stream
So I need to identify the personal page slug or personal-nav item page , which is in the screen.
I need to identify these pages only,
http://mysite.com/members/member-slug/activity/
http://mysite.com/members/member-slug/groups/
`bp_current_component() ` will return you the current component you are viewing
`bp_is_current_component( $bp->activity->slug )` will return true / false depending
`bp_current_action()` will return the current action e.g ‘friends’
`bp_is_current_action()` e.g (‘friends’)
Thanks @Hugo , you are awesome 🙂
@rogercoathup , It won’t works
you need to look here