示例#1
0
 /**
  * Creates / returns the singleton instance of the class
  */
 public static function getInstance()
 {
     static $instance;
     if (!$instance) {
         $instance = new vBNexus();
         $instance->init();
     }
     return $instance;
 }
示例#2
0
 // assign user to usergroup 3 if email needs verification
 //if ($vbulletin->options['verifyemail']){
 //	$newusergroupid = 3;
 //}
 //else
 if ($vbulletin->options['moderatenewmembers'] or $vbulletin->GPC['coppauser']) {
     $newusergroupid = 4;
 } else {
     $newusergroupid = 2;
 }
 if ($fbID) {
     /**
      * ************VBNEXUS************************
      */
     $vBNexus = new vBNexus();
     $vBNexus->init();
     $vBNexus->setConfig('vbnexus_service', "fb");
     $vBNexus->setConfig('vbnexus_userid', $fbID);
     $email = $vbulletin->db->escape_string($vbulletin->GPC['email']);
     $username = $vbulletin->GPC['username'];
     $time = time();
     $publish = $vbulletin->GPC['vbnexus_fb_publish'];
     if (isset($vbulletin->GPC['birthdate'])) {
         $birthday = str_replace("/", "-", $birthday);
     }
     $data = array('type' => "new", 'service' => "fb", 'userid' => $fbID, 'username' => $username, 'password' => md5(time()), 'email' => $email, 'coded_email' => $email, 'default_email' => $email, 'publish' => $publish);
     if (isset($vbulletin->GPC['birthdate'])) {
         $data['birthday'] = $birthday;
     }
     $result = $vBNexus->register($data);
     if ($result) {