user_external icon indicating copy to clipboard operation
user_external copied to clipboard

How to access this->request from user_external module?

Open joe-average-user opened this issue 1 year ago • 2 comments

Hello,

I am trying to write another module for user_external but need to access this->request data for it. I found out that the current code has no valid request field. Is there an easy way (probably inside my module) to gain access to this->request?

I read other apps, but did not really find an abstract doc for this. Maybe a more experienced app author can give me a hint?

Thank you for helping ...

joe-average-user avatar Apr 07 '24 12:04 joe-average-user

I don't know, but I don't think that this is possible even for an app in Nextcloud, since only the index.php file gets access to this->request by default... why would you need access to that object?

violoncelloCH avatar Apr 07 '24 17:04 violoncelloCH

Lets say you want to process the remote IP address for some reason, how do you do that without this->request->getRemoteAddress() from OCP/IRequest ?

joe-average-user avatar Apr 07 '24 20:04 joe-average-user