Updated 024 How to integrate the Create User Helper Method in your Components (markdown)

Amigo 2019-06-28 08:35:20 +02:00
parent 943c34f6d1
commit b36aeab4d3

@ -1,11 +1,15 @@
# HOW TO INTEGRATE THE CREATE USER HELPER METHOD IN YOUR COMPONENTS # HOW TO INTEGRATE THE CREATE USER HELPER METHOD IN YOUR COMPONENTS
Hi. I would like to give you a quick tutorial or demonstration on how to use the user creation method or function in your component. What is the user creation function? [00:00:18](https://www.youtube.com/watch?v=ckFakaQ90JY&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m18s) It is basically a part of code's helper function that gets added to the helper class. What is the User Creation function? [00:00:18](https://www.youtube.com/watch?v=ckFakaQ90JY&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m18s) It is basically a part of code's helper function that gets added to the Helper class.
### Helper Class ### Helper Class
If you don't know where the helper class is let me quickly show you. If you go to your repository where you find your Joomla install, you would go to administrator. There is a helper class for the front end of every component as well as for the back end. Looking in a back end, we go to component, [00:00:55](https://www.youtube.com/watch?v=ckFakaQ90JY&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m55s) expertdatabase You go to helpers, it's basically that file there, that is the helper class. If we open it we see that it's the abstract expertdatabasehelper. That helper class gets included into your component on every page. If you were to open the main back end file with that one(expertdatabase), which get loaded by Joomla first. You'll see that it actually includes that helper file in every page. [00:01:28](https://www.youtube.com/watch?v=ckFakaQ90JY&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m28s) So that means everything inside of that class is available to you everywhere in your component. When we actually go back to our interface, we go to components and then expertdatabase. You would see that there is library and helpers. We have this switch ticked yes, 'add create user helper method', set to yes. That is the [00:02:11](https://www.youtube.com/watch?v=ckFakaQ90JY&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m11s) switch that you need to trip, that component builder knows that you actually want the helper class that creates users to be added to the helper class of your front and back end of your component. I'm going to close out here. I am going to go back to the code. Then I am going to do a simple search for user. [00:02:44](https://www.youtube.com/watch?v=ckFakaQ90JY&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m44s) If the repository is opened you will find Joomla Install, go to administrator. There is a Helper class for the front end of every component as well as for the back end. Looking in a back end, in component there is 'com_expertdatabase'. and under it 'expertdatabase.php'. [00:00:55](https://www.youtube.com/watch?v=ckFakaQ90JY&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m55s) Go to Helpers, that file(See video), is the Helper class. If it is opened the abstract 'expertdatabaseHelper' may be seen. That Helper class gets included into the component on every page. If the main back end file with that one 'expertdatabase' is opened, which get loaded by Joomla first. It includes that Helper file in every page. [00:01:28](https://www.youtube.com/watch?v=ckFakaQ90JY&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m28s) It means that everything in that class is available everywhere in the component. Returning to the interface, Component Builder Dashboard, and then go to components and to 'expertdatabase'. There can Library & Helpers be seen . The switch 'add create user helper method', had been set to 'yes'. [00:02:11](https://www.youtube.com/watch?v=ckFakaQ90JY&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m11s)<<<<<<<<<<<<
That is the switch that should be used, by which Component Builder knows that you actually want the helper class that creates users to be added to the helper class of your front and back end of your component. I'm going to close out here. I am going to go back to the code. Then I am going to do a simple search for user. [00:02:44](https://www.youtube.com/watch?v=ckFakaQ90JY&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m44s)
### Create User ### Create User