public function setupOrganization(User $user)
    {
        $guestCreateOrganization = false;
        $invitationHash = $this->session->get('newInvitation', false);

        if ($guestCreateOrganization || $invitationHash == false) {
            $organization = $this->createOrganization($user);
        }

        if ($invitationHash) {
            $organization = $this->processInvitationByHash($user, $invitationHash);
        }

        return $organization;
    }
public function setupOrganization(User $user)
    {
        $guestCreateOrganization = false;
        $invitationHash = $this->session->get('newInvitation', false);

        if ($guestCreateOrganization || $invitationHash == false) {
            $organization = $this->createOrganization($user);
        }

        if ($invitationHash) {
            $organization = $this->processInvitationByHash($user, $invitationHash);
        }

        return $organization;
    }
public function setupOrganization ( User $ user ) { $ guestCreateOrganization = false ; $ invitationHash = $ this -> session -> get ( 'newInvitation' , false ) ; if ( $ guestCreateOrganization || $ invitationHash == false ) { $ organization = $ this -> createOrganization ( $ user ) ; } if ( $ invitationHash ) { $ organization = $ this -> processInvitationByHash ( $ user , $ invitationHash ) ; } return $ organization ; }
Setup organization from signup. It chekcs if there is an invitationHash
in session

@todo Add Bundle option for $guestCreateOrganization

@param User $user

@return Organization
Setup organization from signup . It chekcs if there is an invitationHash in session