CodeIgniter 4 User Login Tutorial - Part 2 - User Registration

Поделиться
HTML-код
  • Опубликовано: 11 янв 2025

Комментарии • 81

  • @shivanisharma6966
    @shivanisharma6966 4 года назад +3

    hey Alex, I copy your code as you do but in my case, the error list is not shown in my registration form like 9:17 the error list

    • @TheWatcher99
      @TheWatcher99 4 года назад +1

      if (! $this->validate($rules)) {
      $data['validation'] = $this->validator;
      }

  • @Argusaw
    @Argusaw 4 года назад

    Thanks bro, great tutorial, you save me ;D

  • @serenafillee7147
    @serenafillee7147 2 года назад +1

    hey Alex i copied the code but my errorlist is not showing... do u know what can be the problem?

  • @afrozaaktermonisha8158
    @afrozaaktermonisha8158 2 года назад +1

    what is the extension on the chrome? and can u please make tutorial on background image setting in codeigniter 4??

  • @AhteshamChaudhary
    @AhteshamChaudhary 4 года назад

    Thanks bro, i started a project while using your tutorials both CI API and VUE frontend, but i have one question if you can help me bro, after login from vue, how can i get userdata alongwith access token?? please help if you do, my project is opensource about free education to all, so i am not charging anything on that bro. i need help on this one

  • @LifeIsAComedyDontOverDoIt
    @LifeIsAComedyDontOverDoIt 3 года назад

    when i submit the 'form' Error pops up saying
    "Invalid argument supplied for foreach()"
    It shows error in "SYSTEMPATH\BaseModel.php at line 1544"
    how can i fix this ?

  • @_premchand
    @_premchand 4 года назад

    Thanks !!! very useful videos

  • @TheWatcher99
    @TheWatcher99 4 года назад

    Could someone help me?
    I want to return the last id (Primary Key) from my table users after the registration ( $model->insert($data); )
    How can I achieve that?

  • @StefuCatalin
    @StefuCatalin 4 года назад

    the best tutorial for CI. Subscribe button !!!!

    • @AlexLancer
      @AlexLancer  4 года назад

      Wow, thanks!

    • @StefuCatalin
      @StefuCatalin 4 года назад

      You welcome. Maybe when u have time, make a tutorial how to make a custom hook, i mean , after comments section, or after i commented on a article. Or a plugin, like how wordpress use. I don't want to use wp anymore, because for my projects is very complicated, and i try to make it sample. Thank u, again !

  • @anmolsahu6371
    @anmolsahu6371 3 года назад

    I'd faced this error. Class "App\Models\UserModel" not found while pressing Register Button and not able to find the solution over the stack over flow. Plz help with this issue

    •  3 года назад

      C:\xampp\htdocs\ci4\login\app\Controllers\Users.php must write to 3.line: use App\Models\UserModel;

  • @TechnicalVilla
    @TechnicalVilla 4 года назад

    Dont know why save is only updating but not inserting though primary key is there.

  • @bugcdbo8394
    @bugcdbo8394 4 года назад +2

    what is the name of the chrome extension that you use?

    • @geovanex24
      @geovanex24 4 года назад +2

      The name is Fake filler

  • @sherifsalah5563
    @sherifsalah5563 4 года назад

    Thank you so much for this awesome series .. one question tho, what is you vscode font face?

    • @AlexLancer
      @AlexLancer  4 года назад

      Hey, Sherif, it is the default one. I don't remember changing my font.
      Thanks for watching.

  • @sergeygr
    @sergeygr 4 года назад +1

    Hi! Somehow in CI 4.0.4 min/max lenght rule not working.

    • @klens11
      @klens11 4 года назад

      Yeah strange, you figured it out?

  • @anonymoushahaha8059
    @anonymoushahaha8059 3 года назад +1

    I'm facing an error on register.php page that $validation variable is not defined........

    • @ASKnASK
      @ASKnASK Год назад

      Getting the same. Did you ever figure out the issue?
      EDIT: Its the missing endif statement that's causing the error.

  • @josechirino5168
    @josechirino5168 4 года назад

    Thanks. Great Tutorial

  • @jeillya2727
    @jeillya2727 2 года назад

    I am getting a "WHOOOPS we seem to have hit a snag. Please Try Again Later" when i press the login button.
    help :(

  • @MrTopoInformatico
    @MrTopoInformatico 3 года назад

    I've followed all your steps, but when i'm trying to log in, i can access even if the password isn't the correct one, can you help me?

  • @felixmaroy3949
    @felixmaroy3949 4 года назад

    What extension are you using to generate fake data ?

  • @prasadpawar5834
    @prasadpawar5834 4 года назад

    Hey Alex,
    Prasad here
    i download this prjct from github and i set .env and migrate also
    but when i click register it will show me error please help

  • @arafhraaj603
    @arafhraaj603 2 года назад

    Thanks a lot...

  • @Xvqier
    @Xvqier 4 года назад +1

    Hi Alex, I have followed your tutorial and for some reason, the alert danger is not showing any error message. I don't know what went wrong.

  • @snelledre
    @snelledre 4 года назад +1

    Alex keep making video's Codeigniter can use a lot off good tutorials.
    But why you don't use the restfull routes that is so must straight forward.
    I like the way to put more in de models so why not using model validation?
    See this as a positve comment.
    Keep making videos

    • @AlexLancer
      @AlexLancer  4 года назад +1

      You mean why I did not use /users/profile or users/register ?
      If so then the priority for me is user's (visitor's) satisfaction, so I believe shorter uri's are always better.
      And for the user validation, the idea of validating the user by using validation form rules just seemed interesting scenario to create a custom rule and show to the people how you can create custom validation rules. Doing it in the Model would be also good.
      Thanks for the comment @andre jansen

    • @snelledre
      @snelledre 4 года назад

      @@AlexLancer For security reasons use csrf in the forms!
      I miss that completely in your tuts.
      I think that is a good choice for video 6 form security.

    • @AlexLancer
      @AlexLancer  4 года назад

      Yeah. Good idea thanks.

    • @jigglypotatoes
      @jigglypotatoes 4 года назад

      @@snelledre what do you mean by model validation I'm intrigued?

    • @snelledre
      @snelledre 4 года назад +1

      @@jigglypotatoes See the docs codeigniter.com/user_guide/models/model.html#validating-data

  • @dharmindersingh8916
    @dharmindersingh8916 4 года назад +1

    Thanks very helpfull

  • @ashishsadasing5657
    @ashishsadasing5657 2 года назад

    Hello friends,
    I tried to run this code and i am getting an errors which says :
    Class 'APP\Models\UserModel' not found
    at line 48 which is : $model = new UserModel();
    In my controller, i have included this line of code : use APP\Models\UserModel;
    In my Model, i have also included : use CodeIgniter\Model
    Can someone help on that please?

    • @AlexLancer
      @AlexLancer  2 года назад

      maybe namespace should be App\..... not APP\....

  • @wandersonsousa1891
    @wandersonsousa1891 3 года назад

    in the doc has an alert about the $upper parameter from getMethod of request, it says that now is deprecated, so what do i use instead?

  • @popamarius3677
    @popamarius3677 4 года назад

    I'm getting the error
    min_lenght is not a valid rule.
    SYSTEMPATH\Validation\Exceptions\ValidationException.php at line 10
    3 use CodeIgniter\Exceptions\ExceptionInterface;
    4 use CodeIgniter\Exceptions\FrameworkException;
    5
    6 class ValidationException extends FrameworkException implements ExceptionInterface
    7 {
    8 public static function forRuleNotFound(string $rule = null)
    9 {
    10 return new static(lang('Validation.ruleNotFound', [$rule]));
    11 }
    12
    13 public static function forGroupNotFound(string $group = null)
    14 {
    15 return new static(lang('Validation.groupNotFound', [$group]));
    16 }
    17

    • @AlexLancer
      @AlexLancer  4 года назад

      Popo, please upload you code to github so that I can see it.

    • @popamarius3677
      @popamarius3677 4 года назад

      github.com/Danyyy9/Appcodeigniter

    • @LifeIsAComedyDontOverDoIt
      @LifeIsAComedyDontOverDoIt 3 года назад

      its because you have miss spelled as "min_lenght" and not "min_length" ....lol

  • @paulocapucci
    @paulocapucci 4 года назад

    What's is it 24:54, blue button? I like it

    • @AlexLancer
      @AlexLancer  4 года назад +2

      Chrome Extension Form Filler

    • @paulocapucci
      @paulocapucci 4 года назад

      @@AlexLancer thank you so much

  • @azizkaya2490
    @azizkaya2490 4 года назад

    Hi I'm sorry for my bad english. instead of error codes, the screen appears as whoops. How can I open the error codes instead. I am waiting for your help.

    • @AlexLancer
      @AlexLancer  4 года назад +1

      Did you create a ".env" ? If no, then duplicate the "env" file into '.env', then find a line with
      # CI_ENVIRONMENT = production
      uncomment it and replace production with development
      CI_ENVIRONMENT = development

  • @javericablanca4084
    @javericablanca4084 4 года назад +1

    Thank you broh

  • @TheDanleach
    @TheDanleach 4 года назад

    I have followed this but I get the following error: "You must use the "set" method to update an entry." And my user is not being added to my database

    • @AlexLancer
      @AlexLancer  4 года назад

      Hey Dan thanks for watching my Codeigniter 4 tutorial. Can you share some code so that i can see what are you talking about exactly?

    • @TheDanleach
      @TheDanleach 4 года назад

      @@AlexLancer I managed to fix it, I was trying to add an additional field in my database

  • @zahirparambadan9774
    @zahirparambadan9774 4 года назад

    How can I move Register button little bit right side, in register.php

    • @AlexLancer
      @AlexLancer  4 года назад +1

      I am not sure if I understand you correctly, but try adding "float-right" class to your html button.

  • @LifeIsAComedyDontOverDoIt
    @LifeIsAComedyDontOverDoIt 3 года назад

    Error: getVar() is undefined
    does someone know a fix to this???

  • @anpascally
    @anpascally 4 года назад

    thanks

  • @AndreiAndrade1981
    @AndreiAndrade1981 4 года назад

    Hi Alex, do you have any video using transactions?
    I am trying to save information in two different tables.
    Documentation:
    $this->db->transStart();
    $this->db->query('AN SQL QUERY...');
    $this->db->query('ANOTHER QUERY...');
    $this->db->query('AND YET ANOTHER QUERY...');
    $this->db->transComplete();
    But i want to:
    $myModelOne = new MyModelOne();
    $myModelTwo = new MyModelTwo();
    $this->db->transStart();
    $this->myModelOne->insert($dataOne);
    $this->myModelTwo->insert($dataTwo);
    $result = $this->db->transComplete();
    if($result){
    //Success
    }else{
    //error
    }
    I dont know how to do it. Can you help me? Thanks.

    • @AlexLancer
      @AlexLancer  4 года назад +1

      Hey, Andrei, no I did not create any. Will have to look into it.

  • @BigDaddy-zp6hz
    @BigDaddy-zp6hz 4 года назад

    70 % water, you can do better

  • @jigglypotatoes
    @jigglypotatoes 4 года назад

    how i miss 'php artisan make:auth'