Это видео недоступно.
Сожалеем об этом.

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

Поделиться
HTML-код
  • Опубликовано: 6 авг 2020
  • Forgot Password in CodeIgniter 4
    In this session, we discussed about forgot password .
    We have validated the email, that is entered by the user, if the email exists, we are sending a reset password link to registered user email address. otherwise we are displaying an error message.
    The reset password link should clicked with in 15mins of time duration. otherwise we will display a message that reset password link was expired

Комментарии • 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

  • @smorez
    @smorez 3 года назад +2

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

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

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

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

    Great video!
    Thanks for sharing!

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

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

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

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

  • @srinukaranam488
    @srinukaranam488 5 месяцев назад +1

    sir any possible to send code

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

    Can this be done in Codeigniter 3.11?

  • @srinukaranam488
    @srinukaranam488 5 месяцев назад

    i want login , logout , reset and forgot password code

  • @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

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

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

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

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

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

    can you provide code

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

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

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

    Video play not clearly

  • @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

  • @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}