Don't do user activity search for anonymous user, to prevent 'token not set exception'
Fix notice