You are here

MailhandlerAuthenticateDefault.class.php in Mailhandler 6.2

MailhandlerAuthenticateDefault class.

File

plugins/mailhandler/authenticate/MailhandlerAuthenticateDefault.class.php
View source
<?php

/**
 * @file
 * MailhandlerAuthenticateDefault class.
 */
class MailhandlerAuthenticateDefault extends MailhandlerAuthenticate {
  public function authenticate(&$message, $mailbox) {
    list($fromaddress, $fromname) = _mailhandler_get_fromaddress($message['header'], $mailbox);
    $uid = 0;
    if ($from_user = user_load(array(
      'mail' => $fromaddress,
    ))) {
      $uid = $from_user->uid;
    }
    return $uid;
  }

}

Classes

Namesort descending Description
MailhandlerAuthenticateDefault @file MailhandlerAuthenticateDefault class.