Whilst developing some custom pages I wanted to create a custom link to login as a particular user. In order to login as a user you need a couple of variables, the users moodle id, and the your session key.
To print/echo the session key within Moodle you need the following line of code :-
echo $USER->sesskey;
Wednesday, 3 August 2011
How to Print/Echo the Moodle Sesskey (Session Key)
Subscribe to:
Post Comments (Atom)





2 comments:
Post a Comment