For good measure, don't return autocomplete results when not logged in.

This commit is contained in:
Brion Vibber 2010-12-06 17:20:14 -08:00
parent 6662141328
commit 4b4b763255
1 changed files with 8 additions and 0 deletions

View File

@ -87,7 +87,15 @@ class AutocompleteAction extends Action
function prepare($args)
{
// If we die, show short error messages.
StatusNet::setApi(true);
parent::prepare($args);
$cur = common_current_user();
if (!$cur) {
throw new ClientException('Access forbidden', true);
}
$this->groups=array();
$this->users=array();
$q = $this->arg('q');