mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
Update authentication to service provider
This commit is contained in:
@@ -233,11 +233,16 @@ class User_Query implements User_QueryInterface
|
||||
}
|
||||
|
||||
if ($this->only_templates === true) {
|
||||
if (!$this->app['authentication']->getUser()) {
|
||||
throw new InvalidArgumentException('Unable to load templates while disconnected');
|
||||
}
|
||||
$sql .= ' AND model_of = ' . $this->app['authentication']->getUser()->get_id();
|
||||
} elseif ($this->include_templates === false) {
|
||||
$sql .= ' AND model_of=0';
|
||||
} else {
|
||||
} elseif ($this->app['authentication']->getUser()) {
|
||||
$sql .= ' AND (model_of=0 OR model_of = ' . $this->app['authentication']->getUser()->get_id() . ' ) ';
|
||||
} else {
|
||||
$sql .= ' AND model_of=0';
|
||||
}
|
||||
|
||||
if ($this->activities) {
|
||||
|
Reference in New Issue
Block a user