sqrldev / wordpress-sqrl-login

SQRL Login WordPress plugin
MIT License
21 stars 7 forks source link

Fix deprecation warnings emitted by retrieving `id` via magic method. #38

Closed fabacab closed 4 years ago

fabacab commented 4 years ago

Since WordPress 2.1.0, using the WP_User object's magic __get method to retrieve the user's internal ID value has been deprecated. When running with WP_DEBUG defined, calls like $user->id will emit deprecation warnings because this member variable's name has been changed to ID (all capitalized lettering).

This commit updates all calls to $user->id to the current $user->ID name so that these deprecation warnings are no longer written to debug logs.