mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-30 03:24:47 +00:00
If we already have the email address, don't need to do a DB query
This commit is contained in:
parent
cbd1d4f8ea
commit
6f1a20e1a2
@ -660,6 +660,10 @@ class Principal {
|
|||||||
* @return boolean True if found.
|
* @return boolean True if found.
|
||||||
*/
|
*/
|
||||||
public function searchEmails( $email ) {
|
public function searchEmails( $email ) {
|
||||||
|
if ( $self->email == $email ) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
$qry = new AwlQuery('SELECT * FROM usr_emails WHERE user_no = :user_no AND lower(email) = lower(: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) );
|
array(':user_no' => $this->user_no(), ':email' => $email) );
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user