Hooks from: & to: syntax in yml to disable anonymous searches

I mean non logged in user that would create a session cookie to pretend they are logged in but maybe I am fetching a bit too far here as I guess that the currentUser function checks the session key.