User Authentication against another table
Permalink
I’m new to Concrete5, and looking for some guidance. Specifically, if what I want to do can be accomplished, and some help on what direction to go to get it done.
Here’s my setup: I’m running Concrete5 on an IBM i server. It’s running Send Server 8.5, php 5.6, and mysql 5.1.159. I have a website setup and running with concrete5.
I have applications running on the IBM i that utilize the systems DB2 database files. I have data on that side, that I want shared on the Concrete5 web side. IBM has links between mysql and DB2, so making that data appear as though it’s in mysql isn’t a problem.
I want to allow users to register on the Concrete5 website, but I want Concrete5 to validate the information that they provide, against a file that I have on the DB2, before registering them. For instance, they can enter a username, email, and additionally must enter the following to validate: Member ID (that they already know), a date of birth, and possibly a first name. If there isn’t a match against the existing data, then I don’t want them to be able to register. I know I can add the extra fields as user attributes. I’d also add an additional Internal ID attribute that would come back from the DB2 file. The member doesn’t know that number since it is internal – it’s just a link to other data. I’d also like to add the user to a group, based on data that comes back from the DB2.
Once I have the user setup, I want to be able to use the Internal ID (setup at registration), to link to another DB2 file that contains additional transaction information.
(I’m using DB2 here to illustrate that the information is coming from another source. It will appear to Concrete5 as just another table).
Is this possible? If so, where do I start to try and figure this out (knowing that I’m a novice at Concrete5). I’ve viewed a couple books on Concrete5, but they are for pre 5.7, so I'm looking for some guidance.
Here’s my setup: I’m running Concrete5 on an IBM i server. It’s running Send Server 8.5, php 5.6, and mysql 5.1.159. I have a website setup and running with concrete5.
I have applications running on the IBM i that utilize the systems DB2 database files. I have data on that side, that I want shared on the Concrete5 web side. IBM has links between mysql and DB2, so making that data appear as though it’s in mysql isn’t a problem.
I want to allow users to register on the Concrete5 website, but I want Concrete5 to validate the information that they provide, against a file that I have on the DB2, before registering them. For instance, they can enter a username, email, and additionally must enter the following to validate: Member ID (that they already know), a date of birth, and possibly a first name. If there isn’t a match against the existing data, then I don’t want them to be able to register. I know I can add the extra fields as user attributes. I’d also add an additional Internal ID attribute that would come back from the DB2 file. The member doesn’t know that number since it is internal – it’s just a link to other data. I’d also like to add the user to a group, based on data that comes back from the DB2.
Once I have the user setup, I want to be able to use the Internal ID (setup at registration), to link to another DB2 file that contains additional transaction information.
(I’m using DB2 here to illustrate that the information is coming from another source. It will appear to Concrete5 as just another table).
Is this possible? If so, where do I start to try and figure this out (knowing that I’m a novice at Concrete5). I’ve viewed a couple books on Concrete5, but they are for pre 5.7, so I'm looking for some guidance.
That definitely helps on accessing the other database files. Thank you! Now i'll just have to figure our the user auth part.
I tinkered with a c5 site that manipulates a SQLite database (independently to c5's normal databasing). I just used the built-in php calls to do so; there were no tricks.
You're obviously after a higher level of integration than I was. You'll need to hook into the c5 code for validating user log-ins. I dare say there's an exposed call/API/event for this.
You're obviously after a higher level of integration than I was. You'll need to hook into the c5 code for validating user log-ins. I dare say there's an exposed call/API/event for this.
Have you reviewed the database documentation?
https://documentation.concrete5.org/developers/database-management/c...