BP_REST_Signup_Endpoint::get_signup_object( int $identifier )
Get signup object.
Description
Parameters
- $identifier
-
(Required) Signup identifier.
Return
(BP_Signup|bool)
Source
File: bp-members/classes/class-bp-rest-signup-endpoint.php
1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 | public function get_signup_object( $identifier ) { if ( is_numeric ( $identifier ) ) { $signup_args [ 'include' ] = array ( intval ( $identifier ) ); } elseif ( is_email( $identifier ) ) { $signup_args [ 'usersearch' ] = $identifier ; } else { $signup_args [ 'user_login' ] = $identifier ; } // Get signups. $signups = \BP_Signup::get( $signup_args ); if ( ! empty ( $signups [ 'signups' ] ) ) { return reset( $signups [ 'signups' ] ); } return false; } |
Changelog
Version | Description |
---|---|
0.1.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.