$fromaddress))) && strpos($header->to[0]->mailbox, tokenauth_get_token($from_user->uid)) !== FALSE) { $target_node->uid = $from_user->uid; } // Try using mailalias email aliases else if (function_exists('mailalias_user') && ($from_user = mailhandler_user_load_alias($fromaddress, $target_node, $item['mailbox']')) && strpos($header->to[0]->mailbox, tokenauth_get_token($from_user->uid)) !== FALSE) { $message['authenticated_uid'] = $from_user->uid; } else { // If token authentication fails, try as anonymous. $message['authenticated_uid'] = 0; } } } }