MySLP_User
in package
Class MySLP_User a modified WP_User
Tags
Table of Contents
Constants
- DEFAULT_MAX_LOCATIONS = 125
- DEFAULT_MAX_VIEWS = 1000
- DEFAULT_PERIOD = 'month'
- DEFAULT_PLAN_NAME = 'Advanced'
- VIEW_OVERAGE_BLOCKSIZE = 1000
- VIEW_OVERAGE_PRICE = 500
Properties
- $blog_id : mixed
- $primary_user : mixed
- $account_status : mixed
- $api_key : mixed
- $blog_details : mixed
- $blogname : mixed
- $coupon : mixed
- $coupon_code : mixed
- $coupon_details : mixed
- $customer_details : mixed
- $discount : mixed
- $email : mixed
- $expiration_date : mixed
- $first_name : mixed
- $home : mixed
- $ID : mixed
- $last_name : mixed
- $last_payment : mixed
- $location_count : mixed
- $location_limit : int
- $mapview_count : int
- $mapview_limit : int
- $meta_amount : mixed
- $myslp_subscription_plan : mixed
- $payment_customer_id : mixed
- $payment_mode : mixed
- $payment_processor : mixed
- $payment_profileid : mixed
- $payment_status : mixed
- $paypal_data : mixed
- $plan : mixed
- $plan_base_price : mixed
- $post_count : mixed
- $recurring_payments : mixed
- $referer_blacklist_urls : mixed
- $referer_urls : mixed
- $siteurl : mixed
- $status : mixed
- $subscription_details : mixed
- $subscription_is_cancelled : mixed
- $subscription_is_pending : mixed
- $subscription_period : mixed
- $subscription_status : mixed
- $user_email : mixed
- $user_login : mixed
- $user_meta : mixed
- $user_registered : mixed
- $wp_user : mixed
Methods
- __get() : null
- Special interface for private properties.
- __isset() : bool
- Allow isset to be called on private properties.
- __set() : null
- Set our private properties.
- __unset() : mixed
- Allow unset to be called on private properties.
- activate() : bool
- Activate the current user account.
- do_wp_init() : mixed
- We do this during WP's init hook.
- expire() : bool
- Expire the current user account.
- get_current_subscription() : array<string|int, mixed>
- Get the current subscription details for this user.
- get_location_limit() : null
- Needed for the WP filter.
- get_map_view_stats() : array<string|int, mixed>
- Get map view stats for the user.
- is_valid() : bool
- Return true if this user has a valid blog and user ID.
- load() : WP_Error|WP_User|false
- Load up a specific user (by ID)
- load_by_email() : WP_Error|false
- Load up a specific user (by ID)
- load_for_blog() : false|WP_User|null
- Load user for specified blog
- load_for_current_blog() : mixed
- Set this user object to the user that owns the current blog.
- log_referer() : void
- Track all referers for this users.
- might_have_subscription() : bool
- Return true if the user has (or had) an active subscription.
- reload() : mixed
- Reload the current user.
- set_account_status() : bool
- Set the user account state ( 'active' | 'expired' )
- get_primary_user() : WP_User|null
- Retrieves the primary user associated with the specified blog ID.
- property_fallback() : mixed
- Set fallback properties.
- reset() : mixed
- Reset base properties except blog_id.
- set_recurring_payment_properties() : mixed
- Set our local properties when updating the recurring payments array.
Constants
DEFAULT_MAX_LOCATIONS
public
mixed
DEFAULT_MAX_LOCATIONS
= 125
DEFAULT_MAX_VIEWS
public
mixed
DEFAULT_MAX_VIEWS
= 1000
DEFAULT_PERIOD
public
mixed
DEFAULT_PERIOD
= 'month'
DEFAULT_PLAN_NAME
public
mixed
DEFAULT_PLAN_NAME
= 'Advanced'
VIEW_OVERAGE_BLOCKSIZE
public
mixed
VIEW_OVERAGE_BLOCKSIZE
= 1000
VIEW_OVERAGE_PRICE
public
mixed
VIEW_OVERAGE_PRICE
= 500
Properties
$blog_id
public
mixed
$blog_id
$primary_user
public
mixed
$primary_user
= \null
$account_status
private
mixed
$account_status
$api_key
private
mixed
$api_key
$blog_details
private
mixed
$blog_details
$blogname
private
mixed
$blogname
$coupon
private
mixed
$coupon
$coupon_code
private
mixed
$coupon_code
$coupon_details
private
mixed
$coupon_details
$customer_details
private
mixed
$customer_details
$discount
private
mixed
$discount
private
mixed
$email
$expiration_date
private
mixed
$expiration_date
$first_name
private
mixed
$first_name
$home
private
mixed
$home
$ID
private
mixed
$ID
$last_name
private
mixed
$last_name
$last_payment
private
mixed
$last_payment
$location_count
private
mixed
$location_count
$location_limit
private
int
$location_limit
$mapview_count
private
int
$mapview_count
$mapview_limit
private
int
$mapview_limit
$meta_amount
private
mixed
$meta_amount
$myslp_subscription_plan
private
mixed
$myslp_subscription_plan
$payment_customer_id
private
mixed
$payment_customer_id
$payment_mode
private
mixed
$payment_mode
$payment_processor
private
mixed
$payment_processor
$payment_profileid
private
mixed
$payment_profileid
$payment_status
private
mixed
$payment_status
$paypal_data
private
mixed
$paypal_data
$plan
private
mixed
$plan
$plan_base_price
private
mixed
$plan_base_price
$post_count
private
mixed
$post_count
$recurring_payments
private
mixed
$recurring_payments
$referer_blacklist_urls
private
mixed
$referer_blacklist_urls
= array()
$referer_urls
private
mixed
$referer_urls
= array()
$siteurl
private
mixed
$siteurl
$status
private
mixed
$status
$subscription_details
private
mixed
$subscription_details
$subscription_is_cancelled
private
mixed
$subscription_is_cancelled
$subscription_is_pending
private
mixed
$subscription_is_pending
$subscription_period
private
mixed
$subscription_period
$subscription_status
private
mixed
$subscription_status
$user_email
private
mixed
$user_email
$user_login
private
mixed
$user_login
$user_meta
private
mixed
$user_meta
$user_registered
private
mixed
$user_registered
$wp_user
private
mixed
$wp_user
Methods
__get()
Special interface for private properties.
public
__get(mixed $property) : null
Parameters
- $property : mixed
Return values
null__isset()
Allow isset to be called on private properties.
public
__isset(mixed $property) : bool
Parameters
- $property : mixed
Return values
bool__set()
Set our private properties.
public
__set(mixed $property, mixed $value) : null
Parameters
- $property : mixed
- $value : mixed
Return values
null__unset()
Allow unset to be called on private properties.
public
__unset(mixed $property) : mixed
Parameters
- $property : mixed
activate()
Activate the current user account.
public
activate() : bool
Return values
bool —true if the user was activated
do_wp_init()
We do this during WP's init hook.
public
do_wp_init() : mixed
expire()
Expire the current user account.
public
expire() : bool
Return values
bool —true if the user was expired
get_current_subscription()
Get the current subscription details for this user.
public
get_current_subscription() : array<string|int, mixed>
Return values
array<string|int, mixed>get_location_limit()
Needed for the WP filter.
public
get_location_limit() : null
Return values
nullget_map_view_stats()
Get map view stats for the user.
public
get_map_view_stats() : array<string|int, mixed>
Return values
array<string|int, mixed>is_valid()
Return true if this user has a valid blog and user ID.
public
is_valid() : bool
Return values
boolload()
Load up a specific user (by ID)
public
load(int $user_id) : WP_Error|WP_User|false
Parameters
- $user_id : int
-
ID for the user.
Return values
WP_Error|WP_User|falseload_by_email()
Load up a specific user (by ID)
public
load_by_email(string $email) : WP_Error|false
Parameters
- $email : string
-
user email
Return values
WP_Error|falseload_for_blog()
Load user for specified blog
public
load_for_blog(int $blog_id[, int $user_id = null ]) : false|WP_User|null
Parameters
- $blog_id : int
-
ID for the blog to load the user from.
- $user_id : int = null
-
ID for the user (optional)
Return values
false|WP_User|nullload_for_current_blog()
Set this user object to the user that owns the current blog.
public
load_for_current_blog() : mixed
log_referer()
Track all referers for this users.
public
log_referer() : void
Incoming URL requests for geocoding (and eventually map views)
might_have_subscription()
Return true if the user has (or had) an active subscription.
public
might_have_subscription() : bool
Return values
boolreload()
Reload the current user.
public
reload() : mixed
set_account_status()
Set the user account state ( 'active' | 'expired' )
public
set_account_status(mixed $state) : bool
Parameters
- $state : mixed
Return values
boolget_primary_user()
Retrieves the primary user associated with the specified blog ID.
private
get_primary_user(int $blog_id) : WP_User|null
If the primary user is not already set, this method fetches the list of users for the provided blog ID and sets the first user as the primary user.
note: get_users() returns an array of WP_User objects
Parameters
- $blog_id : int
-
The ID of the blog for which to retrieve the primary user.
Return values
WP_User|null —The primary user object associated with the blog.
property_fallback()
Set fallback properties.
private
property_fallback(mixed $property) : mixed
Parameters
- $property : mixed
reset()
Reset base properties except blog_id.
private
reset() : mixed
set_recurring_payment_properties()
Set our local properties when updating the recurring payments array.
private
set_recurring_payment_properties(array<string|int, mixed> $value) : mixed
Parameters
- $value : array<string|int, mixed>