Is there a clean way to get the currently logged in user's uid from a plugin? A search didn't seem to turn up a consensus.
@bbb in what context? A hook? A route handler? A client side script?
A hook. Specifically, action:post.setFields at the moment, but I'll need it for other hooks as well.
@pitaj Im also searching for how to get the current uid for use in a plugin hook method.
Depending on the plugin hook, the uid is included in the payload.
@baris It works thank for your support!
You can use groups:visible:name, groups:visible:memberCount, groups:visible:createtime
Just saw this section on the git! Thank you so much for showing me an example ^_^
@Mega Thanks Mega!
I know this can work, I expect the formal release for this.😏
For anyone else that may find this post and is struggling, this step by step walkthrough really helped me out (at least regarding the php oauth2 server) http://bshaffer.github.io/oauth2-server-php-docs/cookbook/