示例#1
0
function checkUser($called, $caller)
{
    global $vm_base;
    global $mailbox;
    global $user;
    global $file;
    $user = "******";
    if (!is_dir($user)) {
        return false;
    }
    $mailbox = $called;
    $file = vmBuildNewFilename($caller);
    return true;
}
示例#2
0
function checkUser($called, $caller)
{
    global $mailbox;
    global $user;
    global $file;
    $query = "SELECT count(*) as count FROM extensions WHERE extension='{$called}'";
    $res = query_to_array($query);
    if (!$res[0]["count"]) {
        return false;
    }
    $user = vmGetVoicemailDir($called);
    if (!is_dir($user)) {
        mkdir($user);
    }
    $mailbox = $called;
    $file = vmBuildNewFilename($caller);
    return true;
}