function login($user_object, $member_id)
 {
     # requires the User module
     if (class_exists('User') === FALSE) {
         require PATH_MOD . 'user/mod.user' . EXT;
     }
     $U = new User();
     # log in
     $U->_remote_login();
 }
Exemplo n.º 2
0
 /**
  *	Login/Registration During Form Submission
  *
  *	@access		public
  *	@param		array
  *	@return		array
  */
 public function loginreg($data = array())
 {
     if (is_array($this->EE->extensions->last_call) && count($this->EE->extensions->last_call) > 0) {
         $data = $this->EE->extensions->last_call;
     }
     if ($this->EE->input->post('user_login_type') === FALSE or $this->EE->input->post('user_login_type') == '') {
         return $data;
     }
     $this->EE->extensions->end_script = FALSE;
     // ----------------------------------------
     //	Instantiate class
     // ----------------------------------------
     if (class_exists('User') === FALSE) {
         require 'mod.user.php';
     }
     $User = new User();
     if ($this->EE->input->post('user_login_type') != 'register') {
         $User->_remote_login();
     } else {
         $User->_remote_register();
     }
     return $data;
 }