/** * Checks and binds the plans choosen at registration * * @param UserTable $user reflecting the user being registered * @return cbpaidProduct[]|string */ protected function & _getRegistrationChoosenPlans( &$user ) { global $_POST; static $firstCall = true; static $chosenPlans = null; if ( $firstCall ) { $firstCall = false; $params = $this->params; $registrationPlansEnabled = $params->get( 'registrationPlansEnabled', 0 ); if ( $registrationPlansEnabled ) { $subscriptionsGUI = new cbpaidControllerUI(); $chosenPlans = $subscriptionsGUI->getAndCheckChosenRegistrationPlans( $_POST, $user ); } } return $chosenPlans; }