Added clause in the friend search function that checks if the friend is
active before showing details