"-= M.J. Prinsen =-" <various@bovendelft.xs4all.nl>
[squirrelmail.git] / plugins / administrator / auth.php
CommitLineData
7004cc32 1<?php
2
3function adm_check_user() {
4
5 GLOBAL $username;
6
7 $auth = FALSE;
0bde8324 8
9 if ( file_exists( '../plugins/administrator/admins' ) ) {
10 $auths = file( '../plugins/administrator/admins' );
1f9d9ce4 11 $auth = in_array( "$username\n", $auths );
0bde8324 12 }else if ( $adm_id = fileowner('../config/config.php') ) {
7004cc32 13 $adm = posix_getpwuid( $adm_id );
14 if ( $username == $adm['name'] ) {
15 $auth = TRUE;
16 }
17 }
18
19 return( $auth );
20
21}
22
23?>