-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathcallbacks.php
More file actions
32 lines (27 loc) · 724 Bytes
/
Copy pathcallbacks.php
File metadata and controls
32 lines (27 loc) · 724 Bytes
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');
?>