fusio icon indicating copy to clipboard operation
fusio copied to clipboard

Question about logged user.

Open alexfok007 opened this issue 5 years ago • 2 comments

A simple question since i am not former in back-end.

I want to ask how to obtain the authorized user name and user id.

Use case. User want to edit something. The endpoint received edit request then update to database. However, how to i know determine which user edit the database row ?

Thanks

alexfok007 avatar Mar 22 '19 10:03 alexfok007

Hi, so inside an action you have access to the context property which contains information about the current user. Please take a look at: https://www.fusio-project.org/documentation/php/$context

chriskapp avatar Mar 22 '19 18:03 chriskapp

Thanks for your reply. I can get the such information now. :)

Also i can receive the header too.

So powerful.

alexfok007 avatar Mar 25 '19 11:03 alexfok007