Roundcube Community Forum

 

captcha integration

Started by Gautham Vignesh, December 21, 2010, 01:13:30 AM

Previous topic - Next topic

Gautham Vignesh

Hi all,
    why the captcha are available in a separate page instead of appearing in login page , have i need to perform any customization to  make it see them in login page ..?
____________
B.Gautham Vignesh

__________________

rosali

captcha config:


/* Captcha challenge to enter authenticated state */
$rcmail_config['captcha_auth'] = TRUE;


./skins/default/templates/login.html





captcha.php


class captcha extends rcube_plugin {

  public 
$task "login|mail|logout";


It is not designed for this purpose. But these few hacks seem to do the job.
Regards,
Rosali

Gautham Vignesh

Hi Rosali,
          Thanks Rosali.. its integrated now..but after we logout it doesn't appear .. after clicking the login button only it does appears .. and some faults are happening like suddenly shows 0 mails in inbox - when we double click on inbox , it shows the mails.
____________
B.Gautham Vignesh

__________________

rosali

Did you do the following step? -> see '|logout'


class captcha extends rcube_plugin {

  public 
$task "login|mail|logout";
Regards,
Rosali

Gautham Vignesh

Hi Rosali ,
               yeah i done those you have mentioned first.. still thats the problem
____________
B.Gautham Vignesh

__________________

rosali

Does it help to comment the login_after hook?


  
function init()
  {
    
$this->add_texts('localization/');  
    if(
file_exists("./plugins/captcha/config/config.inc.php"))
      
$this->load_config('config/config.inc.php');
    else
      
$this->load_config('config/config.inc.php.dist');
    
$this->add_hook('template_object_captcha', array($this'show_captcha'));
    
//$this->add_hook('login_after', array($this, 'check_captcha'));
    
$this->add_hook('render_page', array($this'check_captcha'));

  }
Regards,
Rosali

Gautham Vignesh

Nopes .. haven't any changes happen :(
____________
B.Gautham Vignesh

__________________

rosali

#7
I use Roundcube v0.5-RC.

Attached version works for me. Remove modification in login.html template.

EDIT: Attachment removed
Regards,
Rosali

Gautham Vignesh

I made a redirection of page .. in index.php
 

 // end session
else if ($RCMAIL->task == 'logout' && isset($_SESSION['user_id'])) {
  
$userdata = array('user' => $_SESSION['username'], 'host' => $_SESSION['imap_host'], 'lang' => $RCMAIL->user->language);
  
$OUTPUT->show_message('loggedout');
  
$RCMAIL->logout_actions();
---->
	
header('location:http://localhost/roundcubemail');  //redirects from ?_task=logout
  
$RCMAIL->kill_session();
  
$RCMAIL->plugins->exec_hook('logout_after'$userdata);
}
____________
B.Gautham Vignesh

__________________

rosali

That's a dirty hack. At least place it after kill_session and logout_after hook.
Regards,
Rosali

Gautham Vignesh

sure yeah ..

I do have some internal errors .. of inbox - shows up no mails in your mailbox .. and when i click on inbox , it displays the mails .. this happens only 1/10 of login .

can you tell me in which file have i need to change it or why is that happens..??
____________
B.Gautham Vignesh

__________________

Gautham Vignesh

Issues to disappearance of captcha :

1. when the user -> correct and pass -> wrong , with captcha -> correct

2. Once the captcha verification is wrong due to abv problem.. i need to clear the history
    to make it appear
____________
B.Gautham Vignesh

__________________

Gautham Vignesh

Issues to disappearance of captcha :

1. when the user -> correct and pass -> wrong , with captcha -> correct

2. Once the captcha verification is wrong due to abv problem.. i need to clear the history
    to make it appear

Rosali can you just find me a way to overcome it ya :)
____________
B.Gautham Vignesh

__________________

rosali

Why do you want to re-captcha if it was already solved correct?
Regards,
Rosali

Gautham Vignesh

i agree your statement Rosali..
this works cool now.. how possible is that i can customize the mailbox .. and under which file i wana to make modifications to do it .. ??
____________
B.Gautham Vignesh

__________________