Delete Cookies when Login button is clicked. Delete Cookies when Login button is clicked.
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Delete Cookies when Login button is clicked.

Started by mr.bena, April 18, 2012, 12:22:36 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mr.bena

Hi, I am using Facebook Login plugin. The plugin is great, however, the users always have to clear their cookies if they would like to login again in a normal way. So, I am really in need to make the javascript delete cookies function run when clicking the "Normal Login" button so the users will not have to delete manually. Could you please give any suggestion?

mr.bena

I added the below codes to "login.php".

Quoteif (isset($_SERVER['HTTP_COOKIE'])) {
    $cookies = explode(';', $_SERVER['HTTP_COOKIE']);
    foreach($cookies as $cookie) {
        $parts = explode('=', $cookie);
        $name = trim($parts[0]);
        setcookie($name, '', time()-1000);
        setcookie($name, '', time()-1000, '/');
    }
}
and
Quotesetcookie ("cpg15x_cookies", "", time()-60000);

These codes still do not delete the cookies or reset them. Please, give me some suggestion. Users could not login the normal way without clearing the cookies.

ΑndrĂ©

I assume your first code block will never be executed, as $_SERVER['HTTP_COOKIE'] isn't set in cpg1.5.x by default. Please read http://documentation.coppermine-gallery.net/en/dev_superglobals.htm

I suggest to post your issue in the plugin's announcement thread (if there isn't already a solution).