# controllerclass-ms-controller-api.php

## Classes

MS_Controller_Api | Exposes the public API.

Package
  \Default

## Tags

None found

## Functions

### ms_has_membership()

    ms_has_membership(integer  $id) : boolean

Template tag: Check if the current user has a specific membership.

Multiple memberships can be specified by adding more parameters to the function call.

Examples:

<?php if ( ms_has_membership() ) : ?> Current user has any membership?

<?php if ( ms_has_membership(100) ) : ?> Current user has membership 100?

<?php if ( ms_has_membership(100,110) ) : ?> Current user has membership 100 or 110?

#### Parameters

integer | $id | Optional. Membership-ID to check. If no value is specified the function will check if the member has any membership at all. Guest/Default memberships are ignored.

#### Returns

boolean —

True if the current member has any/the specified membership.

#

File
  controller/class-ms-controller-api.php

## Tags

package | Default
since | 1.0.1.0
api | Template Tag

###