mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
PHRAS-3694 notif by email on delete inactif account, admin filter (#4216)
This commit is contained in:
@@ -63,6 +63,7 @@ class User_Query
|
||||
protected $only_user_templates = false;
|
||||
protected $templates_only = false;
|
||||
protected $mail_locked_only = false;
|
||||
protected $grace_period_only = false;
|
||||
protected $email_not_null = false;
|
||||
protected $base_ids = [];
|
||||
protected $sbas_ids = [];
|
||||
@@ -264,6 +265,20 @@ class User_Query
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Restrict only on grace period
|
||||
*
|
||||
* @param $boolean
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function grace_period_only($boolean)
|
||||
{
|
||||
$this->grace_period_only = !!$boolean;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Restrict to user with an email
|
||||
*
|
||||
@@ -1003,6 +1018,10 @@ class User_Query
|
||||
$sql .= ' AND mail_locked = 1';
|
||||
}
|
||||
|
||||
if ($this->grace_period_only) {
|
||||
$sql .= ' AND Users.nb_inactivity_email > 0 ';
|
||||
}
|
||||
|
||||
if ($this->emailDomains) {
|
||||
$sql .= $this->generate_field_constraints('email', $this->emailDomains, 'LIKE');
|
||||
}
|
||||
|
Reference in New Issue
Block a user