raptor Posted January 24, 2013 Report Share Posted January 24, 2013 Hello, I'm creating a module where I would like a logged in pilot to view ONLY their info. I have based the module on the Roster module that has been referenced in the forums and tutorials (It's basically a copy of the Roster module showing extra columns that I added for different bank accounts). Is there a variable that returns the users id, like '$whoami' or '$myid'? Something that returns who is accessing the page so they only see their information. Thanks, raptor EDIT: I found that this works after much trial and error: $query = "SELECT * FROM ".TABLE_PREFIX."pilots WHERE pilotid = ".Auth::$userinfo->pilotid.""; Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted January 25, 2013 Administrators Report Share Posted January 25, 2013 If the pilot is logged in you should be able to use the existing user info from the Auth class. The code below should give you a raw dump of what information is available to you in that variable. <?php var_dump(Auth::$userinfo); ?> Quote Link to comment Share on other sites More sharing options...
raptor Posted January 25, 2013 Author Report Share Posted January 25, 2013 Thanks! Var_dump - awsome! I will be using this alot as I'm new to this type of programming. 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.