Florianschmidtwelzow has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/303580

Change subject: Fix Special:ManageGoogleLogin
......................................................................

Fix Special:ManageGoogleLogin

Currently, all actions are trageted to the current logged in user, instead
of the user selected to be managed.

Change-Id: Ifadcf77b12a2d89b3cb333cc798d56f260b7d28a
---
M includes/specials/SpecialManageGoogleLogin.php
1 file changed, 6 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GoogleLogin 
refs/changes/80/303580/1

diff --git a/includes/specials/SpecialManageGoogleLogin.php 
b/includes/specials/SpecialManageGoogleLogin.php
index cafe07e..b82352a 100644
--- a/includes/specials/SpecialManageGoogleLogin.php
+++ b/includes/specials/SpecialManageGoogleLogin.php
@@ -179,11 +179,14 @@
                if ( isset( $data['addgoogleid'] ) ) {
                        $requestAddGoogleId = $data['addgoogleid'];
                }
-               if ( isset( $requestGoogleId ) && 
GoogleUser::hasConnectedGoogleAccount( $user ) ) {
+               if (
+                       isset( $requestGoogleId ) &&
+                       GoogleUser::hasConnectedGoogleAccount( 
$this->manageableUser )
+               ) {
                        // terminate the connection
                        foreach ( $requestGoogleId as $count => $googleId ) {
                                $id = str_replace( 'google-', '', $googleId );
-                               if ( GoogleUser::terminateGoogleConnection( 
$user, $id ) ) {
+                               if ( GoogleUser::terminateGoogleConnection( 
$this->manageableUser, $id ) ) {
                                        $out->addWikiMsg( 
'googlelogin-manage-terminatesuccess' );
                                } else {
                                        $out->addWikiMsg( 
'googlelogin-manage-changederror' );
@@ -215,7 +218,7 @@
                                        $out->addWikiMsg( 
'googlelogin-manage-noplus' );
                                }
 
-                               if ( GoogleUser::connectWithGoogle( $user, 
$requestAddGoogleId ) ) {
+                               if ( GoogleUser::connectWithGoogle( 
$this->manageableUser, $requestAddGoogleId ) ) {
                                        $out->addWikiMsg( 
'googlelogin-manage-changedsuccess' );
                                } else {
                                        $out->addWikiMsg( 
'googlelogin-manage-changederror' );

-- 
To view, visit https://gerrit.wikimedia.org/r/303580
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifadcf77b12a2d89b3cb333cc798d56f260b7d28a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GoogleLogin
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <florian.schmidt.stargatewis...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to