How to SEND LINK in email in codeigniter and how to GET id selected user |
Hello guyz i have create small kind of application in codeigniter,in this application i am doing forgot password module, i have created a function of forgot passowrd and send link in email But did not get id in link so how to set id in link, i want id in link and ecrypted pass in method, I need encrypted URL pass in update password view,
Code: <form id="resetPassword" name="resetPassword" method="POST" action="<?php echo base_url(); ?>welcome/ForgotPassword" onsubmit ='return validate()'> Code: public function sendpassword($data) { Controller: Code: public function update_password()
$userId= $row[0]['id'];
$mail_message .= 'Thanks for contacting regarding to forgot password,<br> Click On Link And Reset Password:<b><a href="http://www.ciadmin.local/welcome/update_password/$userId">Reset Password</a></b>'."\r\n";
Never send any user-identifiable info in the link. This article should be required reading for anyone doing password reset/remember me, etc. They have a bunch of good articles on the topic.
(08-19-2018, 10:48 AM)kilishan Wrote: Never send any user-identifiable info in the link. This article should be required reading for anyone doing password reset/remember me, etc. They have a bunch of good articles on the topic. Indeed - you should generate temporary key that expires over time, and save that key against user ID in separate table. Annoying and more secure, sure, but def saves a lot of hurt in the future. Also, original article bookmarked
(08-20-2018, 06:09 AM)Pertti Wrote:(08-19-2018, 10:48 AM)kilishan Wrote: Never send any user-identifiable info in the link. This article should be required reading for anyone doing password reset/remember me, etc. They have a bunch of good articles on the topic. okok dear |
Welcome Guest, Not a member yet? Register Sign In |