diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Captcha.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Captcha.pm index acea746dc..ab95fd242 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Captcha.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Captcha.pm @@ -101,7 +101,8 @@ sub setCaptcha { my ( $token, $image ) = $self->getCaptcha; $self->logger->debug('Prepare captcha'); $req->token($token); - $req->captcha($image); + $req->tplParams->{CAPTCHA_SRC} = $req->captcha($image); + $req->tplParams->{CAPTCHA_SIZE} = $self->rndmax; } 1; diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Display.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Display.pm index 666528c31..7b66599e3 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Display.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Display.pm @@ -313,15 +313,6 @@ sub display { : () ), ( $req->token ? ( TOKEN => $req->token ) : () ), - ( - $req->captcha - ? ( - CAPTCHA_SRC => $req->captcha, - CAPTCHA_SIZE => $self->{conf}->{captcha_size} - || 6 - ) - : () - ), ( $req->data->{waitingMessage} ? ( WAITING_MESSAGE => 1 ) : () ), );