Changeset 171

Show
Ignore:
Timestamp:
09/17/08 10:15:37 (4 months ago)
Author:
pdingle
Message:

added version compare function to allow plugin to work with versions of WP before and after 2.6.1

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/RB-0.9/wp-infocard/wp/userdata.pw.php

    r169 r171  
    293293                $user_login, 0, COOKIEPATH, COOKIE_DOMAIN); 
    294294 
    295                 //wp_setcookie($user_login, md5($user_pass), TRUE); 
    296                 $secure_cookie = is_ssl() ? true : false; 
    297                 wp_set_auth_cookie($user_ID, (bool)false, (bool)false ); 
    298                 //do_action('wp_login', $user_login); 
     295                global $wp_version; 
     296         
     297                if (version_compare($wp_version,'2.6.1','<')) 
     298                { 
     299                        // use the old cookie scheme 
     300                        wp_setcookie($user_login, md5($user_pass), TRUE); 
     301                        //do_action('wp_login', $user_login); 
     302                } 
     303                else 
     304                { 
     305                        // use the new cookie scheme 
     306                        //$secure_cookie = is_ssl() ? true : false; 
     307                        wp_set_auth_cookie($user_ID, (bool)false, (bool)false ); 
     308                } 
    299309        } // end function setLoginCookies 
    300310