freshJet Posted November 27, 2011 Report Share 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 Link to comment Share on other sites More sharing options...
Tom Posted November 27, 2011 Report Share Posted November 27, 2011 $pilotname = Auth::$userinfo->$firstname; Quote Link to comment Share on other sites More sharing options...
freshJet Posted November 27, 2011 Author Report Share 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 Link to comment Share on other sites More sharing options...
mattia Posted November 27, 2011 Report Share Posted November 27, 2011 try this <?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid). ' ' .$pilot->firstname . ' ' . $pilot->lastname?> Quote Link to comment Share on other sites More sharing options...
freshJet Posted November 27, 2011 Author Report Share Posted November 27, 2011 Nope Quote Link to comment Share on other sites More sharing options...
Tom Posted November 27, 2011 Report Share 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 Link to comment Share on other sites More sharing options...
freshJet Posted November 28, 2011 Author Report Share 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 Link to comment Share on other sites More sharing options...
Tom Posted November 28, 2011 Report Share 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 Link to comment Share on other sites More sharing options...
freshJet Posted November 28, 2011 Author Report Share Posted November 28, 2011 Hooray! Thanks! Quote Link to comment Share on other sites More sharing options...
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.