My favorites | Sign in
Project Logo
                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
/**
* SMTP_Server
*
* @author Jason Johnson <jason@php-smtp.org>
* @copyright Copyright (c) 2008, Jason Johnson
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
* @version 1.0
* @package php-smtp
*/

function auth_example($auth_id, $user_id, $password) {
$users = array(
array('jason','123'),
array('brian','456'),
array('matty','789')
);

for($i = 0; $i < count($users); $i++) {
if($user_id == $users[$i][0] && $password == $users[$i][1]) {
return true;
}
}

return false;
}

function auth_mysql($auth_id, $user_id, $password) { /* ... */ }
function auth_ldap($auth_id, $user_id, $password) { /* ... */ }

$api->register_hook(SMTP_API_AUTH, 'auth_example');
?>
Show details Hide details

Change log

r25 by spligak on Apr 18, 2008   Diff
First pass at indexing outbound messages.
Go to: 
Project members, sign in to write a code review

Older revisions

r24 by spligak on Apr 10, 2008   Diff
Added a basic API infrastructure and a
little more housecleaning
All revisions of this file

File info

Size: 724 bytes, 32 lines
Hosted by Google Code