} } // Create account -------------- if (empty($GLOBALS['script_error_log'])) { $_POST['user_name'] = trim($_POST['user_name']); $_POST['user_location'] = trim($_POST['user_location']); $_POST['user_email'] = trim($_POST['user_email']); if (empty($_POST['user_name'])) { $GLOBALS['script_error_log'][] = _("You must provide a name."); } if (empty($openid_name)) { $GLOBALS['script_error_log'][] = _("You must provide an openid name."); } else { require_once '../class/Db.class.php'; $db = new Database($core_config['db']); $query = "\n\t\t\t\tSELECT user_id\n\t\t\t\tFROM " . $db->prefix . "_user\n\t\t\t\tWHERE openid_name=" . $db->qstr($openid_name); $result = $db->Execute($query); if (!empty($result[0])) { $user_id = $result[0]['user_id']; } } if (!checkEmail($_POST['user_email'])) { $GLOBALS['script_error_log'][] = _("Your email address does not like a valid email address."); } if (empty($_POST['user_location'])) { $GLOBALS['script_error_log'][] = _("You must provide a location."); } if ($_POST['user_password1'] != $_POST['user_password2']) { $GLOBALS['script_error_log'][] = _("Your new passwords did not match."); } if (strlen($_POST['user_password1']) < 2) {
$body = new Template(); // inner template // SETUP WEBSPACE --------------------------------------------------- if (!empty($core_config['script']['single_webspace'])) { // single comain name $user_webspace = $core_config['script']['single_webspace']; } elseif (!empty($core_config['script']['multiple_webspace_pattern'])) { // using sub-domains preg_match($core_config['script']['multiple_webspace_pattern'], $_SERVER['HTTP_HOST'], $matches); if (!empty($matches[1])) { $user_webspace = $matches[1]; } } if (isset($user_webspace)) { // SELECT WEBSPACE ------------------------------------------- $query = "\n\t\tSELECT ws.webspace_css, ws.webspace_html, u.openid_name, \n\t\tu.user_name, u.user_email, u.user_location, u.user_id, \n\t\tws.webspace_title, ws.webspace_theme, u.user_live \n\t\tFROM " . $db->prefix . "_user u \n\t\tLEFT JOIN " . $db->prefix . "_webspace ws ON u.user_id=ws.user_id \n\t\tWHERE \n\t\tu.openid_name=" . $db->qstr($user_webspace); $result = $db->Execute($query, 1); if (!empty($result[0]) && $result[0]['user_live'] == 1) { $webspace = $result[0]; define("WEBSPACE_OPENID", $webspace['openid_name']); define("WEBSPACE_USERID", $webspace['user_id']); define("WEBSPACE_USERNAME", $webspace['user_name']); if (!empty($webspace['webspace_title'])) { $tpl->set('webspace_title', $webspace['webspace_title']); } $body->set('webspace', $webspace); $maintainer_openids = array(); if (!empty($core_config['security']['maintainer_openids'])) { $maintainer_openids = explode(",", $core_config['security']['maintainer_openids']); foreach ($maintainer_openids as $key => $i) { $maintainer_openids[$key] = trim($i);