Muchas gracias por toda la ayuda !!!. Cuando ingresa el usuario se carga el codigo de usuario, el captcha y el boton ingresar
El campo usuario es obligartorio, hasta que no se cargue no puede ingresar, y ahora con ese agregado en la funcion de ci_login no le permite ingresar hasta que no se cargue el captcha.
Finalmente me funciono asi :
En la extension del fomulario datos
require_once "includes/recaptchalib.php"; (Esta libreria se puede bajar de internet sin problemas)
function generar_layout()
{
$this->generar_html_ef('usuario');
$url = toba::vinculador()->get_url('migestion', '2693');
echo '<html>';
echo '<form name = "datos" action="$url" method="POST">';
echo '<div class="g-recaptcha" data-sitekey="6LdbOrUUAAAAAKsb-Lctl0vNZRp41hN0Jz0X_9Rc"></div>';
echo '<script type="text/javascript"
src="
https://www.google.com/recaptcha/api.js">
</script>';
echo '</form>';
echo '</html>';
}
Y luego en ci_login.php
function invocar_autenticacion_por_tipo()
{
$tipo_auth = toba::instalacion()->get_tipo_autenticacion();
if (isset($this->s__datos['usuario']) || isset($this->s__datos_openid['provider'])) { //Para el caso de autenticacion basica y OpenId
$siteKey = "6LdbOrUUAAAAAKsb-Lctl0vNZRp41hN0Jz0X_9Rc";
$secret = "6LdbOrUUAAAAALBNwg6dKRdJRFeyeyff84jVHRC8";
$resp = null;
$error = null;
$reCaptcha = new ReCaptcha($secret);
if ($_POST["g-recaptcha-response"]) {
$resp = $reCaptcha->verifyResponse(
$_SERVER["REMOTE_ADDR"],
$_POST["g-recaptcha-response"]
);
}
if ($resp != null && $resp->success) {
$this->valellave = 'OK'; A esta variable la declro publica
}
if(!isset($this->valellave)){
unset($usuario);
unset($clave);
echo "<script language='JavaScript'>alert('ERROR EN CAPCHA');</script>";
$url = toba::vinculador()->get_url();
echo "<META HTTP-EQUIV='refresh' CONTENT='0 ; URL=$url'>";
exit;
}