Given that I currently only have 'Moodle Administrator' access to my schools system, is there a way I can pass the 'current username' to an external php script.
I've tested on my own local system and from within Moodle, I can refer to $USER->username Is there a way that that can be securely passed to a call of an external script?
If the above is not possible, please could someone advise how one might deal with the following requirement (such that I can ask the 'Site FTP Administrator' to do it on our behalf:
I need to sign on to an external system using the Moodle logon in place of their own as they are satisfied that Moodle has authenticated the user. I can call my script: http://........php?username=nnnnnn where 'nnnnn' is the Moodle username but at the moment I'm not even sure how to do that and additionally this would be very insecure as it could just be pasted into any browser. I fgured that if instead of reading a query string, my script read a session variable (of the username) only available to an authenticated Moodle user then it would be reasonably secure.
Any pointers in the right direction very much appreciated.
Thanks
AM