如何在没有电子邮件验证的情

时间:2018-06-08 13:42:28

标签: php

我正在使用带有PayPal支付网关的数字产品下载网站。 该网站通过发送电子邮件验证链接启用注册。 有时,电子邮件不会发送到用户的收件箱,有时会延迟,每次都会转到垃圾邮件文件夹。

我想通过PHP文件更改此设置。用户无需验证电子邮件即可注册网站。

用户无需任何验证即可在注册后登录。

我有一个代码:

// Login page
public function login($key='')
{
    if( $this->ts_functions->getsettings('loginhome','checkbox') == '0' ) {
        redirect(base_url());
    }
    if($key != '') {
        $res = $this->DatabaseModel->access_database('ts_user','select','',array('user_key'=>$key,'user_status'=>2));
        if( !empty($res) ) {
            $data['invalidAccess'] = 1;
            $this->DatabaseModel->access_database('ts_user','update',array('user_status'=>1,'user_key'=>''),array('user_key'=>$key));
        }
        else {
            $data['invalidAccess'] = 0;
        }
    }
    else {
        $data['invalidAccess'] = 2;
    }
    $data['basepath'] = base_url();
    $data['name_of_page'] = 'login';

    $this->load->view('themes/'.$this->theme.'/home/authenticate/common_header',$data);
    $this->load->view('themes/'.$this->theme.'/home/authenticate/login',$data);
    $this->load->view('themes/'.$this->theme.'/home/authenticate/common_footer',$data);
}

// Register page
public function register()
{
    if( $this->ts_functions->getsettings('registerhome','checkbox') == '0' ) {
        redirect(base_url());
    }

    $data['basepath'] = base_url();
    $data['name_of_page'] = 'register';
    $this->load->view('themes/'.$this->theme.'/home/authenticate/common_header',$data);
    $this->load->view('themes/'.$this->theme.'/home/authenticate/register',$data);
    $this->load->view('themes/'.$this->theme.'/home/authenticate/common_footer',$data);
}

请帮忙。

1 个答案:

答案 0 :(得分:0)

使用PHP Mailer发送电子邮件

访问:https://github.com/PHPMailer/PHPMailer/wiki/Tutorial

了解更多信息或更新您的代码以停止检查用户电子邮件是否已经过验证。

相关问题