Skip to content
This repository has been archived by the owner on Dec 6, 2019. It is now read-only.

Commit

Permalink
fixed pilot login error
Browse files Browse the repository at this point in the history
  • Loading branch information
Nabeel Shahzad committed Apr 27, 2011
1 parent 6e2476b commit 6d3b5a5
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
4 changes: 3 additions & 1 deletion core/common/Auth.class.php
Expand Up @@ -278,7 +278,9 @@ public static function ProcessLogin($useridoremail, $password) {
$hash = md5($password . $userinfo->salt);

if ($hash == $userinfo->password) {
self::$userinfo = $userinfo;

self::$userinfo = $userinfo; #deprecated
self::$pilot = self::$userinfo;

self::update_session(self::$session_id, self::$userinfo->pilotid);

Expand Down
5 changes: 2 additions & 3 deletions core/modules/Login/Login.php
Expand Up @@ -109,6 +109,7 @@ public function ProcessLogin()
$this->render('login_form.tpl');
return false;
} else {

if(Auth::$pilot->confirmed == PILOT_PENDING) {
$this->render('login_unconfirmed.tpl');
Auth::LogOut();
Expand All @@ -117,9 +118,7 @@ public function ProcessLogin()
} elseif(Auth::$pilot->confirmed == PILOT_REJECTED) {
$this->render('login_rejected.tpl');
Auth::LogOut();
}
else
{
} else {
$pilotid = Auth::$pilot->pilotid;
$session_id = Auth::$session_id;

Expand Down
16 changes: 16 additions & 0 deletions core/templates/pireps_airportdropdown.tpl
@@ -0,0 +1,16 @@
<?php
if (!$airport_list) {
echo 'There are no routes for this airline<br />';
return;
}
?>
<select id="<?php echo $name; ?>" name="<?php echo $name;?>">
<option value="">Select an airport</option>

<?php
foreach ($airport_list as $airport) {
echo '<option value="' . $airport->icao . '">' . $airport->icao . ' - ' . $airport->name . '</option>';
}
?>

</select>

0 comments on commit 6d3b5a5

Please sign in to comment.