note 93538 deleted from function.posix-getpwnam by danbrown
| From: | danbrown@php.net | Date: | Tue, 15 Sep 2009 17:31:39 +0000 |
| Subject: | note 93538 deleted from function.posix-getpwnam by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-160586@lists.php.net to get a copy of this message | ||
Note Submitter: dave - a #! T _ spacialaudio.com
----
#!/usr/bin/php -q
<?php
function user_exists($username){
if(posix_getpwnam($username)){
return TRUE;
}else{
return FALSE;
}
}
if(!user_exists("majordude")){
echo "user does not exist, we got work to do\n";
}else{
echo "user exists\n";
}
?>