Tips and Tricks HQ Support Portal › Forums › WP eMember › WP eMember Tweaks › Make member ID the username of the user
- This topic has 7 replies, 3 voices, and was last updated 10 years, 3 months ago by cessna8.
-
AuthorPosts
-
August 21, 2014 at 4:45 am #11344cessna8Member
I am building a website for a aircraft organization I belong to. We would like to have the system make a username based on the member ID.
Is this possible?
August 21, 2014 at 6:51 am #65058adminKeymasterHow are you planning to create the member records? Will the users fill in the registration form or you will use an API like the following to create the user records?
August 21, 2014 at 10:33 am #65059cessna8MemberIm not really sure to be honest. I just see that the wEmember assigns a member id in sequential order. Our organization uses a number to identify each member called an ICS number. I plan on changing the Member ID number (which currently starts with 1) in the database to match the ICS numbers for each current member and than new members who sign up will get the next available member ID number like say 8002 than the next member gets 8003 and so on. So what I would like to do is have that same number become the username. Currently the member has to register with their name and E-Mail, they get the E-Mail to complete registration and than pay their dues, is their a way at that point too implement the member ID for username?
August 21, 2014 at 2:17 pm #65060wzpModeratorI just see that the wEmember assigns a member id in sequential order.
That’s just the MySQL database index number.
Our organization uses a number to identify each member called an ICS number.
Have these numbers already been issued to the members; as in existing member/employee ID numbers? Or are you issuing them for the first time? In other words, do the members already know what their ID number is supposed to be?
So what I would like to do is have that same number become the username.
The member ID number used by eMember is intended to be for internally managing the database, and public knowledge of the value is simply for user convenience. There are a few system related reasons why a database index number may change over time. If any of those cases happen, it would be like to having to tell everyone their passport number has changed, because of a systems upgrade!
If the users already know what their ICS number is, it would be simpler to modify the registration form to change “User Name” to “ICS Number,” and then have some kind of validation occur.
If the ICS numbers are being issued for the first time, it is best to maintain a separate “counter” in the database and have the registration form use the current value as the user name.
Either solution would require some custom PHP coding.
August 21, 2014 at 2:46 pm #65061cessna8MemberCurrent members do know their ICS number already, I am migrating from an old outdated system, so I could set their username to their ICS number as I input them into the new database.
But new members would need to have one assigned automatically and put in place of their username, that’s why I was hoping that member ID would work. All the old members would be upset if I changed their usernames as they are used to it being their ICS number and the club thinks it would get confusing having some use ICS number and new members having their own username.
If it’s not possible than we will have to work it out another way.
August 21, 2014 at 2:48 pm #65062cessna8MemberI don’t know PHP enough to make that work, but I was wondering if someone could help and at what cost.
August 21, 2014 at 2:59 pm #65063wzpModeratorCurrent members do know their ICS number already, I am migrating from an old outdated system, so I could set their username to their ICS number as I input them into the new database.
Which means, that for new members, you’d begin automatically issuing ICS numbers beginning with some predetermined value. In this case, the solution involving the use of a separate counter maintained in the database is the best option.
If you require custom coding assistance, please reference this thread and request a quote. Someone will get back to you:
August 21, 2014 at 5:57 pm #65064cessna8MemberThank You I sent my request
-
AuthorPosts
- You must be logged in to reply to this topic.