mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
PHRAS-3223 Admin - user details - display AuthFailure and Authprovider info (#4002)
PHRAS-3223 * add auth failure tab * auth provider list * api oauth code list * fix limit * delete modificaiton date * add mail locked only filter * add badge on api list
This commit is contained in:
@@ -62,6 +62,7 @@ class User_Query
|
||||
protected $include_templates = false;
|
||||
protected $only_user_templates = false;
|
||||
protected $templates_only = false;
|
||||
protected $mail_locked_only = false;
|
||||
protected $email_not_null = false;
|
||||
protected $base_ids = [];
|
||||
protected $sbas_ids = [];
|
||||
@@ -249,6 +250,20 @@ class User_Query
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Restrict only on mail locked
|
||||
*
|
||||
* @param $boolean
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function mail_locked_only($boolean)
|
||||
{
|
||||
$this->mail_locked_only = !!$boolean;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Restrict to user with an email
|
||||
*
|
||||
@@ -984,6 +999,10 @@ class User_Query
|
||||
$sql .= ' AND (model_of IS NULL OR model_of = ' . $this->app->getAuthenticatedUser()->getId() . ' ) ';
|
||||
}
|
||||
|
||||
if ($this->mail_locked_only) {
|
||||
$sql .= ' AND mail_locked = 1';
|
||||
}
|
||||
|
||||
if ($this->emailDomains) {
|
||||
$sql .= $this->generate_field_constraints('email', $this->emailDomains, 'LIKE');
|
||||
}
|
||||
|
Reference in New Issue
Block a user