includes/class-freemius.php
private function get_user_licenses( $user_id ) {
            $all_licenses = self::get_all_licenses( $this->_module_id );
            if ( empty( $all_licenses ) ) {
                return array();
            }

            $user_license_ids = $this->get_user_linked_license_ids( $user_id );
            if ( empty( $user_license_ids ) ) {
                return array();
            }

            $licenses = array();
            foreach ( $all_licenses as $license ) {
                if ( in_array( $license->id, $user_license_ids ) ) {
                    $licenses[] = $license;
                }
            }

            return $licenses;
        }
private function get_user_licenses( $user_id ) {
            $all_licenses = self::get_all_licenses( $this->_module_id );
            if ( empty( $all_licenses ) ) {
                return array();
            }

            $user_license_ids = $this->get_user_linked_license_ids( $user_id );
            if ( empty( $user_license_ids ) ) {
                return array();
            }

            $licenses = array();
            foreach ( $all_licenses as $license ) {
                if ( in_array( $license->id, $user_license_ids ) ) {
                    $licenses[] = $license;
                }
            }

            return $licenses;
        }
private function get_user_licenses ( $ user_id ) { $ all_licenses = self :: get_all_licenses ( $ this -> _module_id ) ; if ( empty ( $ all_licenses ) ) { return array ( ) ; } $ user_license_ids = $ this -> get_user_linked_license_ids ( $ user_id ) ; if ( empty ( $ user_license_ids ) ) { return array ( ) ; } $ licenses = array ( ) ; foreach ( $ all_licenses as $ license ) { if ( in_array ( $ license -> id , $ user_license_ids ) ) { $ licenses [ ] = $ license ; } } return $ licenses ; }
Get all user's available licenses for the current module.

@author Vova Feldman (@svovaf)
@since  2.0.0

@param number $user_id

@return FS_Plugin_License[]
Get all user s available licenses for the current module .