I know this doesn’t have anything to do with CyberPanel. It is more WordPress related.
If anyone can point me in the right direction, it would be so kind of you.
Here’s what I’m trying to achieve.
I have a list of employees. It has their Employee Numbers, National Identity Card (NIC) numbers and Names.
So, I’m trying to design an online portal using WordPress.
First, all these employees must sign up to use the portal. When signing up, I need to ensure only the organisation’s employees are signing up. Not any outsiders.
So, to achieve this, I’m thinking of using their Employee Number and NIC.
The sign-up form contains fields for both Employee number and NIC. When both fields are a match, the user can sign up. That’s what I need to achieve.
Hello,
you can do it with php yes, but that results in you having a query to a remote/local database that contains all the employee numbers and NIC, which can lead to issues if said database/your website is hacked.
So let me suggest something else, why not only allow registrations from their corporate email address?
When registering, it only accepts emails for example: [email protected]
And of course, they have to confirm their email address with a verification code sent.
That is how LinkedIn confirms that you belong to your company page, they ask for your corporate email and then you enter the verification code received.
In my opinion that would be the simplest way to do it, without having to “expose” more data
@tmoore Yeah, I think I have to go for this remote database solution.
Because not all the employees have cooperative emails.
You are correct, it would be the easiest way to make sure only the company’s employees are signing up.
What do you suggest if I go for this remote database thing?
Sorry, but this is new for me.
You don’t actually need a remote database, you just need a table in your WP database that has had all of the numbers, etc. in it.
Then you can use something like Advanced Custom Fields, add the needed fields to the login form, and run some logic to check if the employee number exists and matches whatever else it needs to match when someone tries to register.