Skip to content

Commit 0a00cef

Browse files
committed
add control error messages
1 parent fcb7c38 commit 0a00cef

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

extensions/Latch/LatchAccount.php

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -120,17 +120,8 @@ function onPreferencesFormPreSave( $formData, $form, $user, &$result )
120120
if( !dbHelper::isPaired() )
121121
{
122122
$oneTimePassword = $formData["formUnpairedTextbox"]; //get the OTP writen by the user in the textbox form
123-
$responsePair = LatchController::doPair($oneTimePassword);
124-
125-
if( $responsePair == -1 )
126-
{
127-
$errorMsg = "Error con el token de pareado, por favor vuelve a enviar el token.";
128-
if ( $errorMsg <> '' )
129-
{
130-
return $errorMsg;
131-
}
132-
}
133-
123+
LatchController::doPair($oneTimePassword);
124+
134125
}
135126
//the user has paired Mediawiki account with Latch
136127
else if( dbHelper::isPaired() && isset( $_POST["wpformPairedButton"] ) )

0 commit comments

Comments
 (0)