LLMS_User_Certificate::can_user_view( int|null $user_id = null )
Can user view the certificate
Parameters Parameters
- $user_id
-
(int|null) (Optional) WP User ID (will use get_current_user_id() if none supplied). Default
null
.Default value: null
Return Return
(bool)
Source Source
File: includes/models/model.llms.user.certificate.php
public function can_user_view( $user_id = null ) { $user_id = $user_id ? $user_id : get_current_user_id(); $result = $this->can_user_manage( $user_id ) || $this->is_sharing_enabled(); /** * Filter whether or not a user can view a user's certificate. * * @since 4.5.0 * * @param boolean $result Whether or not the user can view the certificate. * @param int $user_id WP_User ID of the user viewing the certificate. * @param LLMS_User_Certificate $certificate Certificate class instance. */ return apply_filters( 'llms_certificate_can_user_view', $result, $user_id, $this ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
4.5.0 | Introduced. |