mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-01-27 00:33:34 +00:00
searchEmails should return a boolean, and needs to be public.
This commit is contained in:
parent
1076fd5bfa
commit
cbd1d4f8ea
@ -659,12 +659,12 @@ class Principal {
|
||||
* Find if an email address is associated with this principle.
|
||||
* @return boolean True if found.
|
||||
*/
|
||||
protected function searchEmails( $email ) {
|
||||
$qry = new AwlQuery('SELECT * FROM usr_emails WHERE user_no = :user_no, email = :email',
|
||||
public function searchEmails( $email ) {
|
||||
$qry = new AwlQuery('SELECT * FROM usr_emails WHERE user_no = :user_no AND lower(email) = lower(:email)',
|
||||
array(':user_no' => $this->user_no(), ':email' => $email) );
|
||||
|
||||
if ( $qry->Exec('Principal') ) {
|
||||
return $qry->Rows;
|
||||
return $qry->rows() == 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user