1
gianlucaxoop
Registration

I’m currently creating this website: http://www.flyenvrio.com/cms
If you click on login (under register), you will have to insert the username.
So these are my intentions:
I would like to disable the “username” field from the registrations page because it would be nicer to have this coming up automatically → ENV[pilot number, example “ENV101” etc.]
The text “ENV” should always be present and all I would have to do is lay next to it a succession of number as mentioned above.
At this point when the pilot will have registered, he will be able to see his “username” and “password” etc. automatically in the welcome e-mail.
Is this possible?
Kind Regards,

Gianluca

2
ghia
Re: Registration
  • 2011/2/13 13:17

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Standard, this is not possible. You will have to hack the login procedure and the register procedure (see modules/profile/ and some /class/ files) to depend on the uid and not on the name.
Not the easiest hack.

3
gianlucaxoop
Re: Registration

Thanks ghia,

I want to do that in this case. Were can i modify the name "Username" to Pilot ID?
I'll delete the username name to Pilot id. To the right will be the ENV name and the numer will be at discrection of pilot

4
gianlucaxoop
Re: Registration

Is possible that?

5
Tarik
Re: Registration
  • 2011/2/13 15:46

  • Tarik

  • Not too shy to talk

  • Posts: 170

  • Since: 2010/2/3 1


it's possible by changing the language file cms/language/english/global.php
in the line where
define('_USERNAME''Username: ');

to
define('_USERNAME''Pilot ID: ');
Some people like what you do,
-- some people hate what you do,
---- but most people simply don’t give a damn.

6
gianlucaxoop
Re: Registration

Ok thanks...But this for login.For the registration? Is possible to modify the login mode?
Is possible to access via email or username? Can i add that?

7
redheadedrod
Re: Registration

As was mentioned you can change the language code from Username to PilotID.

The rest could be done in the registration portion of profile. Instead of asking for a username you could blot that out and build a username based on ENV being added to their UID. The problem with this is that you wont know the UID until the record is written to the database as it is an autoincrement. So the profile program would have to be changed to give the user their user name at the end. Although I can't recall off the top of my head but the activation email should give the user name anyhow so you could just make sure they activate and then its not a big deal. They just have to check their email for the user name.

So this would require two database writes at the end of the process. You would write the record out once with a fake user name then read it back in to get the UID and then append that to the ENV and update the record to reflect their user name. Then send out the activation email.

Also realize that if you want the user name to be a static size you may have to do some formatting to the user name. The UID will be a simple integer so you would have ENV1 then later ENV321, ENV1000 etc.. If that is ok with you then no big deal otherwise if you want the number to always be ENV00000 or ENV00001 etc you will have to make sure to format the number accordingly.

Should be a simple matter and if you are interested I could check it out in profile in the next day or two and provide you with the code necissary to make this work.

PM me if you don't figure it out.

Rodney

8
gianlucaxoop
Re: Registration

Thanks redheadrod, Ceck your pm

9
redheadedrod
Re: Registration

In profile 1.67 (By wishcraft..)

in \modules\profile\language\english\main.php

You have the lines ...

At lines 66 and 67..
define('_PROFILE_LANG_UID''user ID');
  
define('_PROFILE_LANG_UNAME''username');



I would change these to...
define('_PROFILE_LANG_UID''Pilot Record ID');
define('_PROFILE_LANG_UNAME''Pilot ID');



(Will add more to this in a few mins..)

10
gianlucaxoop
Re: Registration

I don't have that code in this file

:'(

Login

Who's Online

331 user(s) are online (205 user(s) are browsing Support Forums)


Members: 0


Guests: 331


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits