Added logic for getting activity of user

Signed-off-by: Pritika Nilaratna <nilaratna@brooklynunited.com>