Skip to content

Commit ea1ecca

Browse files
committed
Change WP_User method on User to WPUser to avoid PSR12 issues
1 parent 8d41733 commit ea1ecca

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/User.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ public function __construct(int $id)
7575
}
7676

7777
//---- Data
78-
$this->username = $this->WP_User->data->user_login;
79-
$this->nicename = $this->WP_User->data->user_nicename;
80-
$this->displayName = $this->WP_User->data->display_name;
81-
$this->email = $this->WP_User->data->user_email;
82-
$this->url = $this->WP_User->data->user_url;
83-
$this->registeredDate = $this->WP_User->data->user_registered;
78+
$this->username = $this->WPUser()->data->user_login;
79+
$this->nicename = $this->WPUser()->data->user_nicename;
80+
$this->displayName = $this->WPUser()->data->display_name;
81+
$this->email = $this->WPUser()->data->user_email;
82+
$this->url = $this->WPUser()->data->user_url;
83+
$this->registeredDate = $this->WPUser()->data->user_registered;
8484

8585
//---- Meta
8686
$this->first_name = $this->meta('first_name');
@@ -94,7 +94,7 @@ public function id()
9494
return $this->id;
9595
}
9696

97-
public function WP_User()
97+
public function WPUser()
9898
{
9999
return $this->WP_User;
100100
}

0 commit comments

Comments
 (0)