Esempio n. 1
0
function userAuthenticate($username)
{
    global $this_site, $web_root, $root_dir, $media_dir, $cms_user_access, $default_access, $include_path, $jzUSER;
    // Now let's authenticate this user
    $jzUSER = new jzUser();
    if ($username == "anonymous") {
        $username = NOBODY;
    }
    return $jzUSER->login($username, "cms-user", false);
}
Esempio n. 2
0
// maybe they set hierarchy as a string for some reason:
if (is_string($hierarchy)) {
    $hierarchy = explode("/", $hierarchy);
}
// * * COMMAND LINE JINZORA * * //
include $include_path . 'frontend/cli.php';
// set up our user.
writeLogData("messages", "Index: Setting up the user object");
$jzUSER = new jzUser();
// class handles _SESSION stuff.
writeLogData("messages", "Index: Loading user services");
if (isset($_GET['user']) && isset($_GET['pass'])) {
    $store_cookie = true;
    $prehashed = isset($_REQUEST['pw_hashed']) && $_REQUEST['pw_hashed'] == 'true';
    // Are they ok?
    if ($jzUSER->login($_GET['user'], $_GET['pass'], $store_cookie, $prehashed) === false) {
        //echo "login failed";
        //exit();
    }
} else {
    $prehashed = true;
}
$jzSERVICES->loadUserServices();
if (!isset($_POST['action']) || $_POST['action'] != "login") {
    handleUserInit();
    writeLogData("messages", "Index: Including the icons");
    include_once $include_path . "frontend/icons.lib.php";
    writeLogData("messages", "Index: Creating a new frontend object");
} else {
    handleSetFrontend(false);
}
Esempio n. 3
0
    if (($id = $jzUSER->addUser($ausr, $apass)) !== false) {
        // set admin properties.
        $settings = array();
        $settings['ratingweight'] = 1;
        $settings['stream'] = "true";
        $settings['view'] = "true";
        $settings['lofi'] = "true";
        $settings['download'] = "true";
        $settings['discuss'] = "true";
        $settings['admin'] = "true";
        $settings['jukebox_admin'] = "true";
        $settings['jukebox_queue'] = "true";
        $jzUSER->setSettings($settings, $id);
        $jzUSER->id = $id;
        $jzUSER->name = $ausr;
        $jzUSER->login($ausr, $apass);
    } else {
        if (($id = $jzUSER->lookupUID($ausr)) === false) {
            $retval = -1;
            echo "There was a problem setting up your user account.";
        } else {
            $jzUSER->login($ausr, $apass);
        }
    }
    ?>
				&nbsp; <input type="submit" name="submit_step6_done" class="submit" value="<?php 
    echo $word_proceed_import_media;
    ?>
">
				<?php 
} else {