Skip to content

Commit

Permalink
set default userData from current logged in user
Browse files Browse the repository at this point in the history
  • Loading branch information
aaemnnosttv committed Nov 14, 2019
1 parent 4876021 commit af29410
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion includes/Core/Authentication/Authentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,11 @@ private function refresh_auth_token_on_login() {
*/
private function inline_js_admin_data( $data ) {
if ( ! isset( $data['userData'] ) ) {
$data['userData'] = array();
$current_user = wp_get_current_user();
$data['userData'] = array(
'email' => $current_user->user_email,
'picture' => get_avatar_url( $current_user->user_email ),
);
}
$profile_data = $this->profile->get();
if ( $profile_data ) {
Expand Down

0 comments on commit af29410

Please sign in to comment.