Changeset 8069 for trunk/wp-includes/user.php
- Timestamp:
- 06/11/2008 05:25:55 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/user.php
r7742 r8069 1 1 <?php 2 2 3 function wp_signon( $credentials = '' ) {3 function wp_signon( $credentials = '', $secure_cookie = '' ) { 4 4 if ( empty($credentials) ) { 5 5 if ( ! empty($_POST['log']) ) … … 22 22 do_action_ref_array('wp_authenticate', array(&$credentials['user_login'], &$credentials['user_password'])); 23 23 24 if ( '' === $secure_cookie ) 25 $secure_cookie = is_ssl() ? true : false; 26 24 27 // If no credential info provided, check cookie. 25 28 if ( empty($credentials['user_login']) && empty($credentials['user_password']) ) { … … 28 31 return new WP_User($user); 29 32 30 if ( !empty($_COOKIE[AUTH_COOKIE]) ) 33 if ( $secure_cookie ) 34 $auth_cookie = SECURE_AUTH_COOKIE; 35 else 36 $auth_cookie = AUTH_COOKIE; 37 38 if ( !empty($_COOKIE[$auth_cookie]) ) 31 39 return new WP_Error('expired_session', __('Please log in again.')); 32 40 … … 49 57 return $user; 50 58 51 wp_set_auth_cookie($user->ID, $credentials['remember'] );59 wp_set_auth_cookie($user->ID, $credentials['remember'], $secure_cookie); 52 60 do_action('wp_login', $credentials['user_login']); 53 61 return $user;
Note: See TracChangeset
for help on using the changeset viewer.