You need to call that code from within a hook. Calling it directly inside your plugin is way too soon – get_userdata
is a pluggable function and will not yet be loaded.
You need to call that code from within a hook. Calling it directly inside your plugin is way too soon – get_userdata
is a pluggable function and will not yet be loaded.