public function render() { global $wpdb; ob_start(); //Check if user is already loggedin if (is_user_logged_in()) { return __('You are already logged in.', WEPN_TEXT_DOMAIN); } // check to make sure user registration is enabled $registration_enabled = get_option('users_can_register'); if (!$registration_enabled) { return __('User registration is not enabled', WEPN_TEXT_DOMAIN); } //Check if registration code confirmation is enabled $validate_registration_code = get_option('wepn_validate_registration_code', 'no'); if ($validate_registration_code == 'yes') { $code = !isset($_GET['reg_code']) ? self::get_current_code() : $_GET['reg_code']; // check registration code is exists and active if (WEPN_Admin_Settings::validate_code(esc_attr($code)) == 0) { return __('Registration code does not exists', 'atu'); } else { self::add_current_code($code); } } $fields = $this->get_fields(); WEPN_Notify::display(); WEPN_Form_Builder::create($fields); return ob_get_clean(); }
public function success() { return WEPN_Notify::has_errors() ? false : true; }