freshJet Posted November 27, 2011 Report Posted November 27, 2011 I know this should be pretty simple but I can't get it to work! I've got this on my layout.tpl (it's part of the auth login code): $pilotname = PilotData::GetPilotData(Auth::$userinfo->$firstname); But it just shows blank - no errors or anything. Any ideas? Quote
Tom Posted November 27, 2011 Report Posted November 27, 2011 $pilotname = Auth::$userinfo->$firstname; Quote
freshJet Posted November 27, 2011 Author Report Posted November 27, 2011 Fatal error: Call to undefined method Auth::GetPilotData() in /home/freshje1/public_html/lib/skins/premiumseries/layout.tpl on line 77 Quote
mattia Posted November 27, 2011 Report Posted November 27, 2011 try this <?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid). ' ' .$pilot->firstname . ' ' . $pilot->lastname?> Quote
Tom Posted November 27, 2011 Report Posted November 27, 2011 $pilotname = Auth::$userinfo->$firstname; Fatal error: Call to undefined method Auth::GetPilotData() in /home/freshje1/public_html/lib/skins/premiumseries/layout.tpl on line 77 Someone can't copy and paste? Quote
freshJet Posted November 28, 2011 Author Report Posted November 28, 2011 Someone can't copy and paste? Yes I posted the wrong error but yours doesn't work either: Fatal error: Cannot access empty property in /home/freshje1/public_html/lib/skins/premiumseries/layout.tpl on line 79 What's the code to output it then? I used: <?php echo $pilotname; ?> Quote
Tom Posted November 28, 2011 Report Posted November 28, 2011 Oh, didn't notice you'd put the extra $ in before firstname when I quoted you. <?php echo Auth::$userinfo->firstname; ?> 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.