Это видео недоступно.
Сожалеем об этом.
#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
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
Enjoying the video! Do you happen to have a repo with the code available?
Sure I will update you
I didn't upload as of now
Great video!
Thanks for sharing!
Thank for video, Sir!
Can i try it on local server?
hello thanks for the tutorial, very useful for me.
if possible i would suggest you to use vscode text editor application :)
sir any possible to send code
Can this be done in Codeigniter 3.11?
i want login , logout , reset and forgot password code
can you help us decrypting the password for one of the web app?
For Decrypting, we don't have a secured libraries/Methods in PHP
Better to write your own algorithm for encryption and decryption
i need code
can you provide????????
download code from below URL:
github.com/gophptrainings/CodeIgniter-4-project
this includes all the files used in our video series
can you provide code
Here is the complete code for whole series
github.com/gophptrainings/CodeIgniter-4-project
Video play not clearly
plz Give me Source Code
github.com/gophptrainings/CodeIgniter-4-project
Thank you so much
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);
}
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}