Skip to content
This repository has been archived by the owner on Sep 18, 2018. It is now read-only.

Commit

Permalink
issue #1 - Correção: retorno estava sendo feito de forma incorreta.
Browse files Browse the repository at this point in the history
  • Loading branch information
carloshenrq committed Aug 2, 2016
1 parent 33d99a5 commit e05b82f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/Controller/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -1188,9 +1188,9 @@ public static function login(ServerRequestInterface $request, ResponseInterface
$return = ['stage' => 0, 'loginSuccess' => false, 'loginError' => false];

// Adicionado teste para recaptcha para segurança das requisições enviadas ao forms.
if(BRACP_RECAPTCHA_ENABLED && !self::getApp()->checkReCaptcha($data['recaptcha']))
if(BRACP_RECAPTCHA_ENABLED && (empty($data['recaptcha']) || !self::getApp()->checkReCaptcha($data['recaptcha'])))
{
$return['stage'] = 1;
$return['stage'] = 0;
$return['loginError'] = true;
}
else
Expand Down
2 changes: 1 addition & 1 deletion templates/account.login.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<input id="_submitLogin" type="submit"/>

{if $smarty.const.BRACP_RECAPTCHA_ENABLED eq true}
<div class="recaptcha" ng-model="recaptcha_response" vc-recaptcha key="'{$smarty.const.BRACP_RECAPTCHA_PUBLIC_KEY}'"></div>
<div class="recaptcha" ng-model="$parent.recaptcha_response" vc-recaptcha key="'{$smarty.const.BRACP_RECAPTCHA_PUBLIC_KEY}'"></div>
{/if}
</form>

Expand Down

0 comments on commit e05b82f

Please sign in to comment.