As mentioned in the disclaimer, I didn't know what I was doing and I still don't know it. I've moved on from CodeIgniter and PHP as a whole so I couldn't be bothered to revisit and learn what you're actually supposed to do. So I'll add this to the pinned comment so new visitors to this video try to use this video to understand how to set it up but don't use this as something written in stone. So - - vendor is a directory where you install 3rd party dependencies. This folder is supposed to be untouched. When you share your code base with someone else as part of a git repo this folder will be in .gitignore and hence other people working on your code base will have to run `composer update` to download the dependencies locally for them. What all of that means is that you SHOULD NOT edit the code written in any of the files within the vendor subdirectory. You can read more about it from profesionals here - getcomposer.org/doc/faqs/should-i-commit-the-dependencies-in-my-vendor-directory.md So what should you do instead? My recommendation would be to do your own research on how to do it properly. Google or an experienced friend/colleague would be a good resource. If neither of those resources work, I would recommend going for the manual installation route as mentioned on their github page here - github.com/lonnieezell/myth-auth#manual-installation
@Jverse2 жыл бұрын
Your voice is good man 👌 Make more tech related videos this way.
@kukuhprayuda3 жыл бұрын
why im always getting this email while trying to registrate tho i have already filled in it 'The username field is required'
@thisismehrab4 жыл бұрын
Useful content, Thanks 👍🏽
@kennethkipchumba25323 жыл бұрын
Much appreciated. Build more of CI stuff.
@robiandri6884 жыл бұрын
how to register for another account without going through the register menu that has been created, only the admin can register with a certain groups, there are difficulties in this case applying your algorithm in my project.
@RohanTej4 жыл бұрын
I had to use this myself a while ago and I wrote the code for it like this - pastebin.com/T0DWt5C8 $credentials is an array which looks like this : $creadentials = [ 'username' => 'abc', 'password' => 'abc' ]; and $email is a string for email address. This is not a good piece of code and it can be improved. I recommend you check myth-auth's App\Controllers\AuthController.php::attemptRegister() method to learn more about how the vanilla register works and see if you are able to imporve the code.
@robiandri6884 жыл бұрын
@@RohanTej for me that to complicated, i just need how u hash the password algorithm, i read your code over and over but i still didnt get it.
@RohanTej4 жыл бұрын
@@robiandri688 I can explain how the function works because all that method does is make a password hash and save it in the database. From Line 25 till Line 41 sets up hashing options. You don't need to know how that works. Just copy-paste that code. Line 42 creates the hashed password. '$password' variable is your plain text password which will be hashed. You can do whatever you wish to do with $password_hash. My method does additional checks such as making sure if the user already exists or not and stuff like that. If that is something you want to impliment in your code, you can copy this entire method and pass the arguments like I previously mentioned and it will work out of the box.
@robiandri6884 жыл бұрын
@@RohanTej $user = new UserModel(); This line i dont understand, and this still error, my controller extend from basecontroller, so how i fix this error ?
@RohanTej4 жыл бұрын
@@robiandri688 Did you migrate your models?
@angelotamarones77363 жыл бұрын
thanks for the tutorial but its shows This page isn’t working localhost redirected you too many times.
@sosepi3 жыл бұрын
Could you please share the SQL schema please
@FueguinoTdF4 жыл бұрын
when i create a user it doesn't save the password and username in the database. just save the record with the email.
@RohanTej4 жыл бұрын
Are you using custom views or custom code to insert the record to the database?
@FueguinoTdF4 жыл бұрын
@@RohanTej no, I followed the steps in the video, I am using the default view.
@RohanTej4 жыл бұрын
@@FueguinoTdF that's weird. Not much I can do to help you with that. Can you try rolling back and redo the process? Maybe you made a mistake somewhere. If that doesn't help, I'd recommend raising an issue on stackoverflow where you can post your code and such
@parkhyungseok28414 жыл бұрын
How to change password_hash in table users with password_verify ()?why password_verify always return false
@RohanTej4 жыл бұрын
I am not entirly sure what you mean. But if you want to update the password in the database, then I'd recommend you take a look at App\Controllers\AuthController.php file's attemptReset method to understand how it works. password_verify() is supposed to match the first string which is the user input hashed password with the one in the database. It would return false if they do not match.
@parkhyungseok28414 жыл бұрын
password_InDbs = user()->password_hash; $passwordNow = $this->request->getPost('password_now'); if (password_verify($passwordNow, $password_InDbs)) { echo "success"; } else { echo 'failed'; } *why result always failed? I have entered the correct password but the result is always failed. please help me 🙏
@RohanTej4 жыл бұрын
@@parkhyungseok2841 I am not sure why are you doing it this way. You can use the existing methods as I've mentioned in the video to verify user. If you are trying to figure this out I'd highly recomend you give correct way a shot first. But if you insist on doing it your way, this is how you're supposed to do it. $result = password_verify(base64_encode( hash('sha384', $passwordNow, true)), $user->password_hash);
@parkhyungseok28414 жыл бұрын
Thks you very much , that is work 🙏
@syahisromirajdandi6824 жыл бұрын
How to make CRUD data user?
@zainimuhaimin84813 жыл бұрын
thanks you just help me.
@agokmen18342 жыл бұрын
I went blind 480p
@RohanTej2 жыл бұрын
Sorry about that. Not sure what happened. I originally uploaded it in 1400x900, HD enough that you could clearly read the text. Somehow youtube made it SD.