Closed sanzeeb3 closed 4 years ago
Hi @sanzeeb3
I'm not saying this isn't something we could look into and fix (PR welcome).
But I believe this is probably not the issue with your plugin. As I see it the user ID is only used internally for the SQRL plugin and the only time it actually is used in any external call is when it calls wp_set_auth_cookie( $session['user'] );
which should use the ID in order to create the cookie. And a cookie per nature is a string.
Best regards Daniel
@kalaspuffar I agree. This is not a common issue and nothing's wrong with user ID being a string. As per the expectation of the datatype, I propose return (int) $wp_users[0];
or this can be closed.
Describe the bug To avoid edge cases conflict, cast user id as an integer.
Additional context Conflict with iThemes Security Pro where the session is getting initialized with a stringly typed user id.
Support Post: https://wordpress.org/support/topic/conflict-with-ithemes-security-pro/
https://github.com/sqrldev/wordpress-sqrl-login/blob/3041ab2486eab6db4e348133d1c083e0ff3aa129/sqrl-login.php#L1444