CodeIgniter Forums
DX Auth 1.0.6 (Authentication library) - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: DX Auth 1.0.6 (Authentication library) (/showthread.php?tid=13644)



DX Auth 1.0.6 (Authentication library) - El Forum - 12-22-2008

[eluser]dexcell[/eluser]
[quote author="jaswinder_rana" date="1229919002"]I noticed that when I logout, cookies (or session information) is still there even after user ha logged out.

I tried following code on my logout page
Code:
if($this->dx_auth->is_logged_in(){
echo 'Logged In';
}else{
echo 'Logged Out';
}

When I go to logout page, it shows "Logged In". When I refresh it again, then it says "Logged Out".

I understand that cookies can't be deleted (at least in FireFox) until page is refreshed. So, maybe a redirect behind the scenes on logout page can solve it?

Not sure if it'd be considered bug but just wanted to post my finding.[/quote]

Thanks, if i'm not mistaken Xeoncross who already post little code to fix this.
Try to change logout function to this:

Code:
function logout()
    {
        $this->dx_auth->logout();
        redirect('', 'refresh');        
    }



DX Auth 1.0.6 (Authentication library) - El Forum - 12-22-2008

[eluser]aidanmcg33[/eluser]
Dexcell, any ideas about the captcha issue?


DX Auth 1.0.6 (Authentication library) - El Forum - 12-22-2008

[eluser]dexcell[/eluser]
[quote author="little brittle" date="1229956243"]I have 2 questions:

Why does it say the captcha is "case insensitive" on the registration page, when it is actually case sensitive?

Why does the password reset email address the person as "site name" instead of "username?" For example, if my website is called "Cool Cars Website", and a user named "Frank" resets his password, the email looks like this:

Quote:Cool Cars Website,

You have requested your password to be changed...

Is there an easy way to fix this so that it says "Frank" instead of "Cool Cars Website?"[/quote]

1. Sorry, it's case sensitive but in next version there will be an option in config to determine the captcha using case senstive or not.

2. Yes, open DX_Auth_Event.php and find send forgot password email and change it to fit your needs.


DX Auth 1.0.6 (Authentication library) - El Forum - 12-22-2008

[eluser]jaswinder_rana[/eluser]
[quote author="dexcell" date="1229993715"]
Thanks, if i'm not mistaken Xeoncross who already post little code to fix this.
Try to change logout function to this:

Code:
function logout()
    {
        $this->dx_auth->logout();
        redirect('', 'refresh');        
    }
[/quote]

Thanks. I wasn't aware of this change. I was already redirecting users to my home page to fix this issue. I just wanted to post it here so everyone knows and it can be fixed.


DX Auth 1.0.6 (Authentication library) - El Forum - 12-22-2008

[eluser]dexcell[/eluser]
[quote author="aidanmcg33" date="1229993781"]Dexcell, any ideas about the captcha issue?[/quote]

Sorry i have no idea, looks like you have done it right.
Maybe check your base_url in config file?

Try to play with this in your controller

Code:
$this->load->plugin('dx_captcha');

$vals = array(
    'img_path'         => './captcha/',
    'img_url'            => base_url().'captcha/',
    'font_path'         => './captcha/fonts'
    'font_size'      => '',
    'img_width'         => 320,
    'img_height'     => 95,
    'show_grid'         => TRUE,
    'expiration'     => 180
);

$cap = create_captcha($vals);

echo $cap['image'];



DX Auth 1.0.6 (Authentication library) - El Forum - 12-22-2008

[eluser]dexcell[/eluser]
@aidanmcg33
Btw, If you gave up.
There is plan B: Use recaptcha Tongue (Fortunately, you can use this easily with DX Auth)


DX Auth 1.0.6 (Authentication library) - El Forum - 12-22-2008

[eluser]aidanmcg33[/eluser]
whats the difference and how is this done?


DX Auth 1.0.6 (Authentication library) - El Forum - 12-22-2008

[eluser]dexcell[/eluser]
The difference is the captcha image, and the validation actually hosted by recaptcha.net
It's also widely used captcha, for example in facebook.

First, you need to register at http://recaptcha.net

Get the key, put in dx_auth config, then open auth/registration_recaptcha/


DX Auth 1.0.6 (Authentication library) - El Forum - 12-22-2008

[eluser]Sarre[/eluser]
[quote author="aidanmcg33" date="1229993781"]Dexcell, any ideas about the captcha issue?[/quote]
Did you chmod the captcha directory?
It didn't work for me untill I did that...


DX Auth 1.0.6 (Authentication library) - El Forum - 12-22-2008

[eluser]dexcell[/eluser]
[quote author="dexcell" date="1229995706"]The difference is the captcha image, and the validation actually hosted by recaptcha.net
It's also widely used captcha, for example in facebook.

First, you need to register at http://recaptcha.net

Get the key, put in dx_auth config, then open auth/registration_recaptcha/[/quote]

And there is also recaptcha functions documentation in user guide, don't forget to check it out Smile