i had introduced a bug... userdirectory didn't work when logged out

This commit is contained in:
Hannes Mannerheim 2014-10-21 02:57:52 +02:00
parent 0f87edd9f4
commit 8dba84bd76

View File

@ -212,7 +212,7 @@ class SortableSubscriptionListItem extends SubscriptionListItem
$cur = common_current_user();
list($action, $r2args) = $this->out->returnToArgs();
$r2args['action'] = $action;
if ($cur->hasRight(Right::DELETEUSER)) {
if ($cur instanceof User && $cur->hasRight(Right::DELETEUSER)) {
$this->out->elementStart('li', 'entity_delete');
$df = new DeleteUserForm($this->out, $this->profile, $r2args);
$df->show();