protected function buildUrl($email)
 {
     //插入数据库
     $rand = ranVerify(8);
     if (session('?uid')) {
         $type = 'uid';
     } elseif (session('?oid')) {
         $type = 'oid';
     }
     C('URL_MODEL', 0);
     $url = U("AttachEmail/confirm", "email={$email}&type={$type}&code={$rand}", '', false, true);
     $MailReg = M('Mailreg_url');
     $data = array('email' => $email, 'vld_code_value' => $rand, 'ctime' => time());
     $MailReg->add($data);
     //$this->ajaxReturn($url);
     return $url;
 }
 protected function buildUrl($email, $type)
 {
     $rand = ranVerify(8);
     C('URL_MODEL', 0);
     $url = U("PasswdFind/confirm", "email={$email}&code={$rand}", '', false, true);
     $PasswdF = M('PasswdFind');
     //插入数据库
     $data = array('pfind_email' => $email, 'pfind_code' => $rand, 'ctime' => time());
     if ($type == 'user') {
         $data['pfind_utype'] = 1;
     } elseif ($type == 'org') {
         $data['pfind_utype'] = 2;
     } else {
         exit;
     }
     $PasswdF->add($data);
     return $url;
 }