[wp-trac] [WordPress Trac] #38274: wp_set_auth_cookie and FileSystem relation

WordPress Trac noreply at wordpress.org
Mon Oct 10 14:14:35 UTC 2016


#38274: wp_set_auth_cookie and FileSystem relation
------------------------------------+-----------------------------
 Reporter:  rezamarandi             |      Owner:
     Type:  defect (bug)            |     Status:  new
 Priority:  normal                  |  Milestone:  Awaiting Review
Component:  Login and Registration  |    Version:  4.6.1
 Severity:  normal                  |   Keywords:
  Focuses:                          |
------------------------------------+-----------------------------
 guys i have a new fresh installed on digital ocean server
 my theme do wordpress reseting and then create new auth cookie with bottom
 code :
 {{{#!php
 <?php
 wp_clear_auth_cookie();
 wp_set_current_user($user_id, $user->user_login);
 if ($session_tokens)
 {
         delete_user_meta($user->ID, 'session_tokens');
         update_user_meta($user->ID, 'session_tokens', $session_tokens);
 }

 wp_set_auth_cookie($user_id, true);
 do_action('wp_login', $user->user_login);
 }}}

 its interesting because this piece of code will not work when the
 ownership of wordpress directory is not apache user for example :
 someuser:www-data
 but it will works when we change ownership of server to : www-data:www-
 data

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38274>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list