function pet_lookup_uid in Previewable email templates 8
Same name and namespace in other branches
- 8.4 pet.module \pet_lookup_uid()
- 6 pet.module \pet_lookup_uid()
- 7 pet.module \pet_lookup_uid()
Helper function to look up a uid from mail.
2 calls to pet_lookup_uid()
- PetPreviewForm::pet_validate_recipients in src/
Form/ PetPreviewForm.php - Validate existence of a non-empty recipient list free of email errors.
- pet_send_mail in ./
pet.module - Send tokenized email to a list of recipients.
File
- ./
pet.module, line 62 - Previewable Email Template module.
Code
function pet_lookup_uid($mail) {
$user = user_load_by_mail($mail);
if ($user) {
return $user
->id();
}
return FALSE;
}