#43 Forgot Password | User Management Module | CodeIgniter 4 Tutorials

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 ม.ค. 2025

ความคิดเห็น • 23

  • @satujalan1622
    @satujalan1622 ปีที่แล้ว

    wow, complete tutorial about codeigniter 4, you are really great, very helpful for beginners, and very useful for those who already know the basics of codeigniter 4, thank you very much bro

  • @srinukaranam488
    @srinukaranam488 10 หลายเดือนก่อน +1

    sir any possible to send code

  • @smorez
    @smorez 4 ปีที่แล้ว +2

    Enjoying the video! Do you happen to have a repo with the code available?

    • @GoPHP
      @GoPHP  4 ปีที่แล้ว +1

      Sure I will update you
      I didn't upload as of now

  • @HaiyukMedia
    @HaiyukMedia ปีที่แล้ว

    Thank for video, Sir!
    Can i try it on local server?

  • @vratwork179
    @vratwork179 3 ปีที่แล้ว +1

    Can this be done in Codeigniter 3.11?

  • @someutubchannel69
    @someutubchannel69 4 ปีที่แล้ว

    Great video!
    Thanks for sharing!

  • @ytardihydra3995
    @ytardihydra3995 4 ปีที่แล้ว +1

    hello thanks for the tutorial, very useful for me.
    if possible i would suggest you to use vscode text editor application :)

  • @azmathshaik8786
    @azmathshaik8786 3 ปีที่แล้ว

    can you help us decrypting the password for one of the web app?

    • @GoPHP
      @GoPHP  3 ปีที่แล้ว

      For Decrypting, we don't have a secured libraries/Methods in PHP
      Better to write your own algorithm for encryption and decryption

  • @srinukaranam488
    @srinukaranam488 10 หลายเดือนก่อน

    i want login , logout , reset and forgot password code

  • @ajaysoftwaredevloper1274
    @ajaysoftwaredevloper1274 4 ปีที่แล้ว +1

    i need code
    can you provide????????

    • @GoPHP
      @GoPHP  4 ปีที่แล้ว

      download code from below URL:
      github.com/gophptrainings/CodeIgniter-4-project
      this includes all the files used in our video series

  • @ajaysoftwaredevloper1274
    @ajaysoftwaredevloper1274 4 ปีที่แล้ว +1

    can you provide code

    • @GoPHP
      @GoPHP  4 ปีที่แล้ว

      Here is the complete code for whole series
      github.com/gophptrainings/CodeIgniter-4-project

  • @rajeshbodana7377
    @rajeshbodana7377 3 ปีที่แล้ว +1

    plz Give me Source Code

    • @GoPHP
      @GoPHP  3 ปีที่แล้ว +1

      github.com/gophptrainings/CodeIgniter-4-project

    • @rajeshbodana7377
      @rajeshbodana7377 3 ปีที่แล้ว

      Thank you so much

  • @shams12march
    @shams12march 3 ปีที่แล้ว

    Video play not clearly

  • @kaparapsekiel6300
    @kaparapsekiel6300 3 ปีที่แล้ว

    Great tutorial
    i am unable to send the reset password link.
    I get the response "Sorry! Unable to update. Try again".
    However the database table indicates the "updated_at", has actually been updated.
    Where could i be wrong?
    My code is slightly changed to sort the issue of "std object" as i was getting errors on the exact tutorial
    here is the code:
    public function fg_password()
    {
    $data = [];
    if($this->request->getMethod() == 'post')
    {
    $rules = [
    'email' => [
    'label' => 'Email',
    'rules' => 'required|valid_email',
    'errors' => [
    'required' => '{field} field required',
    'valid_email' => 'Valid {field} required'
    ]
    ],
    ];
    if($this->validate($rules))
    {
    $email = $this->request->getVar('email', FILTER_SANITIZE_EMAIL);
    $userdata = $this->loginModel->verifyEmail($email);
    if(!empty($userdata))
    {
    //if($this->loginModel->updateAt($userdata['uniid']))
    if($this->loginModel->updateAt($userdata->uniid))
    {
    //$to = $email;
    $to = $this->request->getVar('email');
    $subject = 'Reset Password Link';
    //$token = $userdata['uniid'];
    $token = $userdata->uniid;
    //$message = 'Hi '.$userdata['firstname']. ' '
    $message = 'Hi '.$this->request->getVar('firstname',FILTER_SANITIZE_STRING). ' '
    . 'Your password reset request has been received. Please Click'
    . 'the below link to reset your password. '
    . '< a href = "'.base_url().'/login/rt_password/'.$token.'"> Click here to Reset Password'
    . 'Thanks Taffao Real Estate | Realtors';
    //$email = \Config\Services::email();
    //$email -> setTo($to);
    $this->email -> setTo($to);
    //$email -> setFrom('tromturk@gmail.com','Taffao Realtors');
    $this->email -> setFrom('tromturk@gmail.com','Taffao Realtors');
    //$email -> setSubject($subject);
    $this->email -> setSubject($subject);
    //$email -> setMessage($message);
    $this->email -> setMessage($message);
    //if($email->send())
    if($this->email->send())
    {
    $this->session->setTempdata('success', 'Reset password link sent to your registered email. Please verify within 15 minutes',3);
    return redirect()->to(current_url());
    }
    else
    {
    //$data = $email->printDebugger(['headers']);
    //print_r($data);
    $this->session->setTempdata('error', 'Updat successfully. Sorry! Unable to sent activation link. Please ensure you are connected to the internet. If this persist, Contact Admin',3);
    return redirect()->to(current_url());
    }
    }
    else
    {
    $this->session->setTempdata('error', 'Sorry! Unable to update. Try again',3);
    return redirect()->to(current_url());
    }
    }
    else
    {
    $this->session->setTempdata('error', 'Email does not exist',3);
    return redirect()->to(current_url());
    }
    }
    else
    {
    $data['validation'] = $this->validator;
    }
    }
    return view('fg_password_vw', $data);
    }

    • @kaparapsekiel6300
      @kaparapsekiel6300 3 ปีที่แล้ว

      The logs is as follows
      CRITICAL - 2021-07-01 06:24:52 --> Undefined variable: id
      #0 /opt/lampp/htdocs/taffo/app/Models/LoginModel.php(28): CodeIgniter\Debug\Exceptions->errorHandler(8, 'Undefined varia...', '/opt/lampp/htdo...', 28, Array)
      #1 /opt/lampp/htdocs/taffo/app/Controllers/Login.php(103): App\Models\LoginModel->updateAt('8ac89080ed9b3eb...')
      #2 /opt/lampp/htdocs/taffo/vendor/codeigniter4/framework/system/CodeIgniter.php(928): App\Controllers\Login->fg_password()
      #3 /opt/lampp/htdocs/taffo/vendor/codeigniter4/framework/system/CodeIgniter.php(436): CodeIgniter\CodeIgniter->runController(Object(App\Controllers\Login))
      #4 /opt/lampp/htdocs/taffo/vendor/codeigniter4/framework/system/CodeIgniter.php(336): CodeIgniter\CodeIgniter->handleRequest(NULL, Object(Config\Cache), false)
      #5 /opt/lampp/htdocs/taffo/index.php(37): CodeIgniter\CodeIgniter->run()
      #6 {main}