Jump to content

Pilot Retire Not Working


Omerr01

Recommended Posts

  • Administrators

If I follow your question, I think you are having retired pilots submitting PIREPs, probably through kACARS which in turn sets them back to active and allows them to login. If this is the case, there is a little known item in the file PIREP sequence that does this.

In ACARSData.class.php file in the filePIREP function there is a line of code that sets them back to active around line 323.

# Set them as non-retired
PilotData::setPilotRetired($pilotid, 0);

Not a big deal if they are trying to login and submit manually because they never get to that point due to not being able to login. But, using kACARS even if they are retired they can submit a PIREP.

You can either comment out the code above which will allow them to submit a PIREP but it will not show and they will not be able to login the site as they will still be retired, or you can add a couple of lines in the "case'pirep'" function at the start to check if the pilot id retired and if they are then just stop the script.

$pilotinfo = PilotData::getPilotData($xml->verify->pilotID);
if($pilotinfo->retired == 1){exit;}

Link to comment
Share on other sites

If I follow your question, I think you are having retired pilots submitting PIREPs, probably through kACARS which in turn sets them back to active and allows them to login. If this is the case, there is a little known item in the file PIREP sequence that does this.

In ACARSData.class.php file in the filePIREP function there is a line of code that sets them back to active around line 323.

# Set them as non-retired
PilotData::setPilotRetired($pilotid, 0);

Not a big deal if they are trying to login and submit manually because they never get to that point due to not being able to login. But, using kACARS even if they are retired they can submit a PIREP.

You can either comment out the code above which will allow them to submit a PIREP but it will not show and they will not be able to login the site as they will still be retired, or you can add a couple of lines in the "case'pirep'" function at the start to check if the pilot id retired and if they are then just stop the script.

$pilotinfo = PilotData::getPilotData($xml->verify->pilotID);
if($pilotinfo->retired == 1){exit;}

okey thanks you very much..

where i put this code :

$pilotinfo = PilotData::getPilotData($xml->verify->pilotID);

if($pilotinfo->retired == 1){exit;}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...