From 7f5b51a8f3bf384c5e9cfa9839c07e05f6b09809 Mon Sep 17 00:00:00 2001 From: Eddie Kohler Date: Fri, 15 Sep 2023 17:41:15 -0400 Subject: [PATCH] Chair can "act as" a CDB-only user. --- src/contact.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/contact.php b/src/contact.php index 804a00748..ad5a650fe 100644 --- a/src/contact.php +++ b/src/contact.php @@ -664,10 +664,11 @@ private function actas_user($x) { // new account must exist $u = $this->conf->user_by_email($email); - if (!$u - && validate_email($email) - && $this->conf->opt("debugShowSensitiveEmail")) { - $u = Contact::make_email($this->conf, $email)->store(); + if (!$u && validate_email($email)) { + $u = $this->conf->cdb_user_by_email($email); + if (!$u && $this->conf->opt("debugShowSensitiveEmail")) { + $u = Contact::make_email($this->conf, $email)->store(); + } } if (!$u) { return $this;