ViewPhoto: simplify filter verification
This commit is contained in:
@@ -723,9 +723,8 @@ class Asset
|
||||
}
|
||||
|
||||
// Take active filter into account as well
|
||||
if (!empty($activeFilter))
|
||||
if (!empty($activeFilter) && ($user = Member::fromSlug($activeFilter)) !== false)
|
||||
{
|
||||
$user = Member::fromSlug($activeFilter);
|
||||
$where[] = 'id_user_uploaded = {int:id_user_uploaded}';
|
||||
$params['id_user_uploaded'] = $user->getUserId();
|
||||
}
|
||||
|
||||
@@ -75,6 +75,11 @@ abstract class User
|
||||
return $this->ip_address;
|
||||
}
|
||||
|
||||
public function getSlug()
|
||||
{
|
||||
return $this->slug;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether user is logged in.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user