Well, at the top of the page the text "You are logged in as Abe Loveless" comes from lang/en_utf8/moodle.php and the following line/variable:

$string['loggedinas'] = 'You are logged in as $a';

I haven't figured out where that $a gets populated, but if you can find that... I think what would put us on the right track.

It has to be stored in a session variable, I would think. Although, I would be a little surprised if it actually stores the username. I think it will probably store an ID, then lookup names in the db when required.

I wonder if you could find a simple php script to find/print all active session variables, and include it in the footer.php to figure it out.




On 10/21/2010 10:04 AM, Scott Oyer wrote:
Hey Moodle guys...

I am trying to finish up a block for a Moodle installation and need to pull the 
actual username of the person that is logged into moodle. I can't seem to find 
what that variable is in moodle so I can pass it through my script....

Thanks.

Scott Oyer


| Subscription info at http://www.tech-geeks.org |


| Subscription info at http://www.tech-geeks.org |

Reply via email to