mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-08 10:34:34 +00:00
Fix unit tests
This commit is contained in:
@@ -110,6 +110,12 @@ class User_Query implements User_QueryInterface
|
||||
*/
|
||||
protected $only_templates = false;
|
||||
|
||||
/**
|
||||
*
|
||||
* @var boolean
|
||||
*/
|
||||
protected $email_not_null = false;
|
||||
|
||||
/**
|
||||
*
|
||||
* @var Array
|
||||
@@ -222,6 +228,10 @@ class User_Query implements User_QueryInterface
|
||||
$sql .= ' AND usr.invite=0 ';
|
||||
}
|
||||
|
||||
if ( ! $this->email_not_null) {
|
||||
$sql .= ' AND usr.usr_mail IS NOT NULL ';
|
||||
}
|
||||
|
||||
if ($this->only_templates === true) {
|
||||
$sql .= ' AND model_of = ' . $this->app['phraseanet.user']->get_id();
|
||||
} elseif ($this->include_templates === false) {
|
||||
@@ -439,6 +449,18 @@ class User_Query implements User_QueryInterface
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param boolean $boolean
|
||||
* @return User_Query
|
||||
*/
|
||||
public function email_not_null($boolean)
|
||||
{
|
||||
$this->email_not_null = ! ! $boolean;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param array $rights
|
||||
|
Reference in New Issue
Block a user