locale =get_user_setting($user_id, 'language'); $WT_SESSION->theme_dir=get_user_setting($user_id, 'theme'); // If we have no access rights to the current gedcom, switch to one where we do if (!userIsAdmin($user_id)) { if (!userCanAccess($user_id, WT_GED_ID)) { foreach (get_all_gedcoms() as $ged_id=>$ged_name) { if (userCanAccess($user_id, $ged_id)) { $ged=$ged_name; $url='index.php'; break; } } } } //-- section added based on UI feedback // $url is set to individual.php below if a URL is not passed in... it will then be resent as "individual.php" when the user attempts to login if ($url=='individual.php') { foreach (get_all_gedcoms() as $ged_id=>$ged_name) { if (get_user_gedcom_setting($user_id, $ged_id, 'gedcomid')) { $pid = get_user_gedcom_setting($user_id, $ged_id, 'gedcomid'); $ged = $ged_name; break; } } if ($pid) { $url = "individual.php?pid=".$pid; } else { //-- user does not have a pid? Go to My Page $url = "index.php"; } } // If we've clicked login from the login page, we don't want to go back there. if (strpos($url, WT_SCRIPT_NAME)===0) { $url='index.php'; } $url = str_replace("logout=1", "", $url); $url .= "&"; // Simplify the preg_replace following $url = preg_replace('/(&|\?)ged=.*&/', "$1", html_entity_decode(rawurldecode($url),ENT_COMPAT,'UTF-8')); // Remove any existing &ged= parameter if (substr($url, -1)=="&") $url = substr($url, 0, -1); $url .= "&ged=".$ged; $url = str_replace(array("&&", ".php&", ".php?&"), array("&", ".php?", ".php?"), $url); // Redirect to the target URL header('Location: '.WT_SERVER_NAME.WT_SCRIPT_PATH.$url); exit; } } else { $tSERVER_URL = preg_replace(array("'https?://'", "'www.'", "'/$'"), array("","",""), WT_SERVER_NAME.WT_SCRIPT_PATH); $tLOGIN_URL = preg_replace(array("'https?://'", "'www.'", "'/$'"), array("","",""), get_site_setting('LOGIN_URL')); if (empty($url)) { if ((isset($_SERVER['HTTP_REFERER'])) && ((stristr($_SERVER['HTTP_REFERER'],$tSERVER_URL)!==false)||(stristr($_SERVER['HTTP_REFERER'],$tLOGIN_URL)!==false))) { $url = basename($_SERVER['HTTP_REFERER']); if (stristr($url, ".php")===false) { $url = "index.php?ged=$GEDCOM"; } } else { if (isset($url)) { if (stristr($url,WT_SERVER_NAME.WT_SCRIPT_PATH)!==false) $url = WT_SERVER_NAME.WT_SCRIPT_PATH; } else $url = "individual.php"; } } } $controller=new WT_Controller_Base(); $controller->setPageTitle(WT_I18N::translate('webtrees user login')); $controller->pageHeader(); echo '
| ';
switch ($WELCOME_TEXT_AUTH_MODE) {
case 1:
echo WT_I18N::translate(' Access to this site is permitted to every visitor who has a user account. If you have a user account, you can login on this page. If you don\'t have a user account, you can apply for one by clicking on the appropriate link below. After verifying your application, the site administrator will activate your account. You will receive an email when your application has been approved.'); break; case 2: echo WT_I18N::translate(' Access to this site is permitted to authorized users only. If you have a user account you can login on this page. If you don\'t have a user account, you can apply for one by clicking on the appropriate link below. After verifying your information, the administrator will either approve or decline your account application. You will receive an email message when your application has been approved.'); break; case 3: echo WT_I18N::translate(' Access to this site is permitted to family members only. If you have a user account you can login on this page. If you don\'t have a user account, you can apply for one by clicking on the appropriate link below. After verifying the information you provide, the administrator will either approve or decline your request for an account. You will receive an email when your request is approved.'); break; case 4: echo WT_I18N::translate(' Access is permitted to users who have an account and a password for this website.'); if (get_gedcom_setting(WT_GED_ID, 'WELCOME_TEXT_CUST_HEAD')) { echo ' ', get_gedcom_setting(WT_GED_ID, 'WELCOME_TEXT_AUTH_MODE_'.WT_LOCALE), ' '; } break; } if (!isset($_COOKIE[WT_SESSION_NAME])) { echo ''.
WT_I18N::translate('This site uses cookies to keep track of your login status. |