Hello, I have question please, in 47:27 you use session_destroy in login/logout controller how suppose to return "session("user")->id" !! it gives me "Attempt to read property "id" on null"
If (password_verify($password, $result->password)) in this line at password it become red underlined and with that error agar m run krta hu to brouser pe kehta h attempt to read propeerty on id null
@@unitrai merci pour votre réponse, Je suis sur un projet web (devoir d'école puisque Je suis etudiant en bachelier informatique et j'avais choisi comme thème, construction d'une plate forme d'annonces pour la recherche d'emploi. Et la condition est que Je dois utiliser comme frame work codeigniter4. Et j'ai du mal à commencer. Cependant j'ai déjà crée la table utilisateur, et bien d'autres tables... et les cas d'utilisation sont entre autres: inscription, connection, authentification, deconnection, poster annonce, recherche annonce, commentaries, postuler, general utilisateur.... et j'ai commencé avec la construction de certains uses cases comme par exemple inscription en affichant le formulaire, puis se connecter, s'authentifier, se deconnecter et je n'arrive pas. À chaque fois j'ai le message de woops ou de 404, et Aussi je ne sais pas comment faire apparaitre les la page d'acceuil avec les liens qui doivent me diriger vers les autres pages salon leurs fonctionnalités...ça me donne des insomnies parce que je n'arrive à trouver une bonne video en français, et je trouve votre video interressante, c'est dommage pour moi que je ne comprends pas ce que vous dites. Si jamais vous reussissez à la traduire en français, n'hesitez pas à m'avertir.
Please make sure you have this line $this->session = \Config\Services::session(); within initController() function of BaseController.php controller file
i did it! the problem is exactly at that line, at the base controller, idk why, everytime i remove the comment at that line, that error appears....@@unitrai
i think this is not core php tutorial. you should use Codeigniter 4 encrypt function to encrypt password. if alreayd have option in CI 4 then why using core php password encrypt function.
Make sure your database is connected (database config is correct) Make sure you are choosing the right table using builder Make sure the methods of builder are properly chained.