From 2c3400fb4f5a22951d42f286975201bf817d7883 Mon Sep 17 00:00:00 2001 From: floppydiskette Date: Fri, 13 Sep 2024 12:58:12 +0100 Subject: wrong --- src/operations/mixins/user_from_email.cr | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 src/operations/mixins/user_from_email.cr (limited to 'src/operations/mixins/user_from_email.cr') diff --git a/src/operations/mixins/user_from_email.cr b/src/operations/mixins/user_from_email.cr new file mode 100644 index 0000000..862fa9a --- /dev/null +++ b/src/operations/mixins/user_from_email.cr @@ -0,0 +1,7 @@ +module UserFromEmail + private def user_from_email : User? + email.value.try do |value| + UserQuery.new.email(value).first? + end + end +end -- cgit v1.2.3-54-g00ecf