瀏覽代碼

More Multiple Login work

causefx 8 年之前
父節點
當前提交
fe6c10df2d
共有 9 個文件被更改,包括 29 次插入37 次删除
  1. 1 1
      lang/de.ini
  2. 1 1
      lang/en.ini
  3. 1 1
      lang/es.ini
  4. 1 1
      lang/fr.ini
  5. 1 1
      lang/it.ini
  6. 1 1
      lang/nl.ini
  7. 1 1
      lang/pl.ini
  8. 0 6
      settings.php
  9. 22 24
      user.php

+ 1 - 1
lang/de.ini

@@ -149,7 +149,7 @@ TRANSLATIONS_ABOUT = "Wir benötigen immer Hilfe bei der Übersetzung. Sollten S
 UPGRADE = "Upgrade"
 LOADING_COLOR = "Hintergrund Ladebildschirm"
 HOVER_TEXT = "Einblendungs-Text"
-COOKIE_PASSWORD = "Cookie-Passwort - used for Multiple Logins and Cookie Authorization"
+COOKIE_PASSWORD = "Cookie-Passwort - used for Multiple Logins, Cookie Authorization and auth_request"
 CREATE_USER = "Konto registrieren"
 ENTER_PASSWORD_TO_REGISTER = "Registrierungspasswort eingeben"
 SUBMIT = "Absenden"

+ 1 - 1
lang/en.ini

@@ -149,7 +149,7 @@ TRANSLATIONS_ABOUT = "We always need help with translations.  If you speak anoth
 UPGRADE = "Upgrade"
 LOADING_COLOR = "Loading Background"
 HOVER_TEXT = "Hover Text"
-COOKIE_PASSWORD = "Cookie Password - used for Multiple Logins and Cookie Authorization"
+COOKIE_PASSWORD = "Cookie Password - used for Multiple Logins, Cookie Authorization and auth_request"
 CREATE_USER = "Create Account"
 ENTER_PASSWORD_TO_REGISTER = "Enter Password To Register"
 SUBMIT = "Submit"

+ 1 - 1
lang/es.ini

@@ -149,7 +149,7 @@ TRANSLATIONS_ABOUT = "We always need help with translations.  If you speak anoth
 UPGRADE = "Upgrade"
 LOADING_COLOR = "Loading Background"
 HOVER_TEXT = "Hover Text"
-COOKIE_PASSWORD = "Cookie Password - used for Multiple Logins and Cookie Authorization"
+COOKIE_PASSWORD = "Cookie Password - used for Multiple Logins, Cookie Authorization and auth_request"
 CREATE_USER = "Create Account"
 ENTER_PASSWORD_TO_REGISTER = "Enter Password To Register"
 SUBMIT = "Submit"

+ 1 - 1
lang/fr.ini

@@ -149,7 +149,7 @@ TRANSLATIONS_ABOUT = "We always need help with translations.  If you speak anoth
 UPGRADE = "Upgrade"
 LOADING_COLOR = "Loading Background"
 HOVER_TEXT = "Hover Text"
-COOKIE_PASSWORD = "Cookie Password - used for Multiple Logins and Cookie Authorization"
+COOKIE_PASSWORD = "Cookie Password - used for Multiple Logins, Cookie Authorization and auth_request"
 CREATE_USER = "Create Account"
 ENTER_PASSWORD_TO_REGISTER = "Enter Password To Register"
 SUBMIT = "Submit"

+ 1 - 1
lang/it.ini

@@ -149,7 +149,7 @@ TRANSLATIONS_ABOUT = "We always need help with translations.  If you speak anoth
 UPGRADE = "Upgrade"
 LOADING_COLOR = "Loading Background"
 HOVER_TEXT = "Hover Text"
-COOKIE_PASSWORD = "Cookie Password - used for Multiple Logins and Cookie Authorization"
+COOKIE_PASSWORD = "Cookie Password - used for Multiple Logins, Cookie Authorization and auth_request"
 CREATE_USER = "Create Account"
 ENTER_PASSWORD_TO_REGISTER = "Enter Password To Register"
 SUBMIT = "Submit"

+ 1 - 1
lang/nl.ini

@@ -149,7 +149,7 @@ TRANSLATIONS_ABOUT = "We always need help with translations.  If you speak anoth
 UPGRADE = "Upgrade"
 LOADING_COLOR = "Loading Background"
 HOVER_TEXT = "Hover Text"
-COOKIE_PASSWORD = "Cookie Password - used for Multiple Logins and Cookie Authorization"
+COOKIE_PASSWORD = "Cookie Password - used for Multiple Logins, Cookie Authorization and auth_request"
 CREATE_USER = "Create Account"
 ENTER_PASSWORD_TO_REGISTER = "Enter Password To Register"
 SUBMIT = "Submit"

+ 1 - 1
lang/pl.ini

@@ -149,7 +149,7 @@ TRANSLATIONS_ABOUT = "Zawsze potrzebujemy pomocy z tłumaczeniami.  Jeżeli znas
 UPGRADE = "Ulepsz"
 LOADING_COLOR = "Tło ładowania"
 HOVER_TEXT = "Tekst przy najechaniu kursorem"
-COOKIE_PASSWORD = "Hasło ciasteczek - used for Multiple Logins and Cookie Authorization"
+COOKIE_PASSWORD = "Hasło ciasteczek - used for Multiple Logins, Cookie Authorization and auth_request"
 CREATE_USER = "Stwórz konto"
 ENTER_PASSWORD_TO_REGISTER = "Wpisz hasło by zarejestrować"
 SUBMIT = "Prześlij"

+ 0 - 6
settings.php

@@ -1825,12 +1825,6 @@ echo buildSettings(
 							'onclick' => 'if ($(\'#git_branch_id[data-changed]\').length) { alert(\'Branch was altered, save settings first!\') } else { if (confirm(\''.translate('GIT_FORCE_CONFIRM').'\')) { performUpdate(); ajax_request(\'POST\', \'forceBranchInstall\'); } }',
 						),
 					),
-					array(
-						'type' => 'checkbox',
-						'labelTranslate' => 'MULTIPLE_LOGINS',
-						'name' => 'multipleLogin',
-						'value' => MULTIPLELOGIN,
-					),
 				),
 			),
 			array(

+ 22 - 24
user.php

@@ -452,30 +452,28 @@
 			$token = $this->get_user_token($username);
 			//Check Token with Session
 			if($token == $_SESSION["token"]) { return true; }
-            if(MULTIPLELOGIN == "true"){
-                if(isset($_COOKIE["Organizr"]) && isset($_COOKIE["OrganizrU"]) && isset($_COOKIE["cookiePassword"])){
-                    if($_COOKIE["cookiePassword"] == COOKIEPASSWORD && strlen($_COOKIE["Organizr"]) == 32){
-                        return true;
-                    }else{
-                        $this->error("cookie token mismatch for $username");
-                        unset($_COOKIE['Organizr']);
-                        setcookie('Organizr', '', time() - 3600, '/', DOMAIN);
-                        setcookie('Organizr', '', time() - 3600, '/');
-                        unset($_COOKIE['OrganizrU']);
-                        setcookie('OrganizrU', '', time() - 3600, '/', DOMAIN);
-                        setcookie('OrganizrU', '', time() - 3600, '/');
-                        unset($_COOKIE['cookiePassword']);
-                        setcookie("cookiePassword", '', time() - 3600, '/', DOMAIN);
-                        setcookie("cookiePassword", '', time() - 3600, '/');
-						unset($_COOKIE['Auth']);
-			            setcookie("Auth", '', time() - 3600, '/', DOMAIN);
-			            setcookie("Auth", '', time() - 3600, '/');
-						unset($_COOKIE['mpt']);
-			            setcookie("mpt", '', time() - 3600, '/', DOMAIN);
-			            setcookie("mpt", '', time() - 3600, '/');
-                        return false;
-                    }
-				}
+            if(isset($_COOKIE["Organizr"]) && isset($_COOKIE["OrganizrU"]) && isset($_COOKIE["cookiePassword"])){
+                if($_COOKIE["cookiePassword"] == COOKIEPASSWORD && strlen($_COOKIE["Organizr"]) == 32){
+                    return true;
+                }else{
+                    $this->error("cookie token mismatch for $username");
+                    unset($_COOKIE['Organizr']);
+                    setcookie('Organizr', '', time() - 3600, '/', DOMAIN);
+                    setcookie('Organizr', '', time() - 3600, '/');
+                    unset($_COOKIE['OrganizrU']);
+                    setcookie('OrganizrU', '', time() - 3600, '/', DOMAIN);
+                    setcookie('OrganizrU', '', time() - 3600, '/');
+                    unset($_COOKIE['cookiePassword']);
+                    setcookie("cookiePassword", '', time() - 3600, '/', DOMAIN);
+                    setcookie("cookiePassword", '', time() - 3600, '/');
+					unset($_COOKIE['Auth']);
+		            setcookie("Auth", '', time() - 3600, '/', DOMAIN);
+		            setcookie("Auth", '', time() - 3600, '/');
+					unset($_COOKIE['mpt']);
+		            setcookie("mpt", '', time() - 3600, '/', DOMAIN);
+		            setcookie("mpt", '', time() - 3600, '/');
+                    return false;
+                }
 			}
 			return false;
 		}