You are here

function pet_lookup_uid in Previewable email templates 7

Same name and namespace in other branches
  1. 8.4 pet.module \pet_lookup_uid()
  2. 8 pet.module \pet_lookup_uid()
  3. 6 pet.module \pet_lookup_uid()

Helper function to look up a uid from mail.

2 calls to pet_lookup_uid()
pet_send_mail in ./pet.module
Send tokenized email to a list of recipients.
pet_validate_recipients in includes/pet.admin.inc
Validate existence of a non-empty recipient list free of email errors.

File

./pet.module, line 281
Previewable Email Template module.

Code

function pet_lookup_uid($mail) {
  $uid = db_query_range('SELECT uid FROM {users} WHERE mail = :mail', 0, 1, array(
    ':mail' => $mail,
  ))
    ->fetchField();
  return $uid;
}