コード例 #1
0
/**
 * does an admin user exits
 *
 * Checks to see if an admin user has been created
 * @return boolean true if an admin user has been defined
 */
function adminUserExists()
{
    return admin_user_exists();
}
コード例 #2
0
ファイル: setup.php プロジェクト: hunter2814/reason_package
            } else {
                $h = fopen($www_local_htaccess, "x+");
                fwrite($h, $str);
                fclose($h);
                echo '<p>Created .htaccess file to support the www/local directory</p>';
            }
        }
    }
    $mybuf = ob_get_contents();
    ob_end_clean();
    if (isset($alarm) && $alarm) {
        echo '<p class="error">Warning: The .htaccess setup for the local version of your www folder may be improperly setup</p>';
    }
    echo $mybuf;
}
if (admin_user_exists() == false) {
    $password = create_pass();
    $password_hash = sha1($password);
    $user_id = create_admin_user($password);
    if ($user_id > 0) {
        // create the page types demo site if running the first time (i.e. there is no admin user)
        reason_include_once('function_libraries/admin_actions.php');
        reason_include_once('classes/entity_selector.php');
        $ptds_id = id_of('page_types_demo_site');
        $ptds_entity = new entity($ptds_id);
        $path = WEB_PATH . trim_slashes($ptds_entity->get_value('base_url'));
        echo '<h3>Checking for Page Types Demo site</h3>';
        if (!is_dir($path)) {
            echo '<p>Creating demo site</p>';
            reason_include_once('classes/url_manager.php');
            include_once CARL_UTIL_INC . 'basic/filesystem.php';