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

Amigo 2019-07-01 12:35:58 +02:00
parent a02dabca6a
commit 24a03af75d
1 changed files with 2 additions and 2 deletions

@ -38,11 +38,11 @@ available in that class. It has been added as freebies and should not necessaril
### Get User Field
Here is 'getUser' when the page loads initially. The ID and the data are collected, get packed into some HTML and gets send off. This is a php site where this 'Create user' is being done. [00:15:16](https://www.youtube.com/watch?v=ckFakaQ90JY&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15rm16s) Then there is a Ajax site in Javascript. As the page loads in the JavaScript, you would get 'User' with the 'User ID' and the User ID from the field and then the data gets loaded. It shows the data which is loaded and that data can be edited except over here(Username). [00:15:51](https://www.youtube.com/watch?v=ckFakaQ90JY&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m51s) Numbers can not be added in the username but this(see video) may be done and it will update it and will indicate that it is updated. If there is a error with the email already used it will also show an error. This is how JavaScript had been set up. Javascript has been added to the View file. Here is 'getUser', and the function is displayed. [00:16:24](https://www.youtube.com/watch?v=ckFakaQ90JY&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m24s) Usually two functions are used in this case, one that are on standby and eventually setting up the data into the view. This is how the call structure would usually look in index.php?option=your components name, and the task which must go to the Ajax controller. And then this(getuser) is the task. [00:16:54](https://www.youtube.com/watch?v=ckFakaQ90JY&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m54s) Here can be stipulated in what format you would like the result set returned in. If the result set needs to be returned raw, which is sometimes the case, there is a raw variable. The raw variable may be set to true.<<<<<<<<<<<<<<<
Here is 'getUser' when the page loads initially. The ID and the data are collected, get packed into some HTML and gets send off. This is a php site where this 'Create user' is being done. [00:15:16](https://www.youtube.com/watch?v=ckFakaQ90JY&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15rm16s) Then there is a Ajax site in Javascript. As the page loads in the JavaScript, you would get 'User' with the 'User ID' and the User ID from the field and then the data gets loaded. It shows the data which is loaded and that data can be edited except over here(Username). [00:15:51](https://www.youtube.com/watch?v=ckFakaQ90JY&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m51s) Numbers can not be added in the username but this(see video) may be done and it will update it and will indicate that it is updated. If there is a error with the email already used it will also show an error. This is how JavaScript had been set up. Javascript has been added to the View file. Here is 'getUser', and the function is displayed. [00:16:24](https://www.youtube.com/watch?v=ckFakaQ90JY&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m24s) Usually two functions are used in this case, one that are on standby and eventually setting up the data into the view. This is how the call structure would usually look in index.php?option=your components name, and the task which must go to the Ajax controller. This 'getUser' is the task. [00:16:54](https://www.youtube.com/watch?v=ckFakaQ90JY&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m54s) Here can be stipulated in what format you would like the result set returned in. If the result set needs to be returned 'raw', which is sometimes the case, there is a 'raw' variable. [00:17:23](https://www.youtube.com/watch?v=ckFakaQ90JY&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m23s) The 'raw' variable may be set to true and it will give the results set just like that without braces around them, or a call back or anything. You will notice that when calls are made from JavaScript, it usually wants this call back to be added. If calls is made from other JavaScript libraries, you might just want the braces around it. But if it is wanted 'raw' which also is often the case, just add the variable 'raw' to the URL = true and then end up passing it back with 'json_encode'. NB.The format should remain 'json'. [00:17:56](https://www.youtube.com/watch?v=ckFakaQ90JY&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m56s)<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Then it will give you the results set just like that without braces around them, [00:17:23](https://www.youtube.com/watch?v=ckFakaQ90JY&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m23s) or a call back or anything. You see when you make calls from JavaScript, it usually wants this call back to be added. If you make calls from other JavaScript libraries, you might just want the braces around it. But if you want it raw which also is often the case you just add the variable raw to the URL = true and then end up passing it back to you with this. So that's a little heads up on Ajax function. [00:17:56](https://www.youtube.com/watch?v=ckFakaQ90JY&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m56s) The format must stay json, that's important.
### Use Tokens