验证链接已发送

时间:2019-07-04 06:25:50

标签: php codeigniter controller

这是我的验证电子邮件:

private function verification_email($name,$email,$uid){
    $data['user'] = $name;
    $data['link'] = $this->verification_link($email,$uid);
    $this->user_model->sendMail(
        $email,
        "Account Verification Mail - Moviebizcoin",
        $this->load->view("welcome/verification", $data, true )
    );
}

这是我的验证链接:

private function verification_link($email,$uid){
    $t = time();
    $code = md5("/".$email."/".$uid."/".$t."/");
    $bc = $this->bcrypt->hash_password($code)."~~~".$code."~~~".$t;
    $this->db->query(
        "update users 
         set verification_code='$bc',verify='0' 
         where id='$uid'"
    );  
    $link = base_url()."welcome/login/$email/".$code;

    return $link;
}

0 个答案:

没有答案