fix error messages if account is already liked with 3rdparty
authormutec <webmaster@mysterycode.de>
Fri, 7 Apr 2017 17:11:44 +0000 (19:11 +0200)
committermutec <webmaster@mysterycode.de>
Fri, 7 Apr 2017 17:11:44 +0000 (19:11 +0200)
the language items for those error-messages use template-scripting (`{if LANGUAGE_USE_INFORMAL_VARIANT}deinem{else}Ihrem{/if}`) which is not supported by `Language::get()`, but `Language::getDynamicVariable()`

wcfsetup/install/files/lib/action/FacebookAuthAction.class.php
wcfsetup/install/files/lib/action/GithubAuthAction.class.php
wcfsetup/install/files/lib/action/GoogleAuthAction.class.php
wcfsetup/install/files/lib/action/TwitterAuthAction.class.php

index 633acc42141d62aa95ce35cc78dc6b403cb9e729..6c31b6350a00441ead5ba608c359936130aab7dd 100644 (file)
@@ -90,7 +90,7 @@ class FacebookAuthAction extends AbstractAction {
                        if ($user->userID) {
                                // a user is already connected, but we are logged in, break
                                if (WCF::getUser()->userID) {
-                                       throw new NamedUserException(WCF::getLanguage()->get('wcf.user.3rdparty.facebook.connect.error.inuse'));
+                                       throw new NamedUserException(WCF::getLanguage()->getDynamicVariable('wcf.user.3rdparty.facebook.connect.error.inuse'));
                                }
                                // perform login
                                else {
index 313ff22063cd5e99260671b98948834947679cae..e1a59d31a59e20abc1d4951cbffac3c0afe17279 100644 (file)
@@ -84,7 +84,7 @@ class GithubAuthAction extends AbstractAction {
                        if ($user->userID) {
                                // a user is already connected, but we are logged in, break
                                if (WCF::getUser()->userID) {
-                                       throw new NamedUserException(WCF::getLanguage()->get('wcf.user.3rdparty.github.connect.error.inuse'));
+                                       throw new NamedUserException(WCF::getLanguage()->getDynamicVariable('wcf.user.3rdparty.github.connect.error.inuse'));
                                }
                                // perform login
                                else {
index 4a5927a1dd2f04997c70c97da1fa4b9e5ea3f73d..0169d35fbf0cce02d3fc69f230de58f26e749140 100644 (file)
@@ -83,7 +83,7 @@ class GoogleAuthAction extends AbstractAction {
                        if ($user->userID) {
                                // a user is already connected, but we are logged in, break
                                if (WCF::getUser()->userID) {
-                                       throw new NamedUserException(WCF::getLanguage()->get('wcf.user.3rdparty.google.connect.error.inuse'));
+                                       throw new NamedUserException(WCF::getLanguage()->getDynamicVariable('wcf.user.3rdparty.google.connect.error.inuse'));
                                }
                                // perform login
                                else {
index 8164c5e389f9c569de5749e2cbd8dfba27d2cc45..6c19e278511e00506448577ffb558a531a3d11a1 100644 (file)
@@ -78,7 +78,7 @@ class TwitterAuthAction extends AbstractAction {
                        if ($user->userID) {
                                // a user is already connected, but we are logged in, break
                                if (WCF::getUser()->userID) {
-                                       throw new NamedUserException(WCF::getLanguage()->get('wcf.user.3rdparty.twitter.connect.error.inuse'));
+                                       throw new NamedUserException(WCF::getLanguage()->getDynamicVariable('wcf.user.3rdparty.twitter.connect.error.inuse'));
                                }
                                // perform login
                                else {