Jump to content

Ranking Issue


zubeek

Recommended Posts

Hi Guys,

Have another issue at the moment that i've only just noticed

We have renamed all our ranks etc and have manual rankings on - But when a new user registers and they are accepted their rank automatically says New Hire

That rank hasn't been around for a long time - Cache has been cleared and maintenance has run quite a few times since then - I thought something might have stuck somewhere.

I noticed this issue https://github.com/nshahzad/phpVMS/issues/13 that explains the exact issue I'm having but it was closed roughly 2 years ago

Cheers

Dan

Link to comment
Share on other sites

  • Administrators

This is a well known issue when using "manual" ranking.

There is a piece of code that is called during the pilot registration process that is in the RanksData.class.php file that is to update the rank of the new pilot but on line 192 is:

/* Don't calculate a pilot's rank if this is set */
if (Config::Get('RANKS_AUTOCALCULATE') == false) {
return;
}

which stops the system from updating the rank if you have ranking set to "manual" so the pilot ends up with the database default which is "New Hire" from the original package.

You have three solutions avalable.

1 - Place some code in the if statement at line 194 to update the pilots rank even though the system is set to "manual" if it is equal to New Hire which would hopefully avoid the system updating the rank automaticaaly everytime a pilot adds hours to his records.

2 - Change the default settings for the database table to what you want them to be for a new registration.

post-198-0-68425500-1374983154_thumb.png

3 - "Manually" set the rank as that is what you have the system set to.

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...