Hello,
I am making a form to parse user from my WordPress to Moodle. I want that, the username (PRN No. in my case) and password should save in database on first login(which is working well). After whenever user go to that form, form should load data from database and fill that custom code so user automatically log in. I have placed DB read on load if yes then it should run that script if no, it should render form and all. But the places are vacant which I want to load from database.
@GreyHead, do you have any solution?
Hi abhishekpatil ,
Sorry for the slow reply - I have been ill for the last week and not checking the forum much.
I'm also sorry that I have no idea what you need to do here - that looks like a custom form to be used in a Thank You message in which case your DB Read would need to be in the same action before the Thank You message.
Bob
I want to parse user to Moodle. Means, user will enter PRN No. and Password, input we have to take using chronoforms, and that fields should save in database. After, that field valu will be assigned to other variables as mentioned in above program and I will run that custom code which will login user in Moodle. The sentence underlined had not any relationship with chronoform, so dont think about it,
Only I want to know that, there is a form, once user will enter value in form, and from next time, value should automatically appear there. So what will be the conditions and all? Am using chronoforms V5.
variables i want to load :
uname
password2
Hi abhishekpatil,
You can save user data to a database table and then re-load that when the user returns - but to do so you have to be able to recognise the user somehow. Either they log in or they provide a unique identifier like a username.
Bob
PS Be very careful saving usernames and passwords of any kind in database tables!! They should at the least be carefully encrypted, and IMHO should only be used for passwords that you have created for them.
As per your suggestions, I kept username same, means username will be passed as current logged in user, but how to encrypt and store password using chronoform?
Is it possible using chronoform?
If yes, then how to load it again by decrypting?
Hi abhishekpatil,
You can use PHP to encrypt/decrypt a string - there are various libraries available.
Bob