[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-forums/bbpress/bb-includes/ -> functions.bb-pluggable.php (summary)

(no description)

File Size: 937 lines (28 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 33 functions

  bb_auth()
  bb_check_login()
  bb_get_current_user()
  bb_set_current_user()
  bb_current_user()
  bb_is_user_authorized()
  bb_is_user_logged_in()
  bb_login()
  bb_logout()
  bb_validate_auth_cookie()
  bb_set_auth_cookie()
  bb_clear_auth_cookie()
  wp_redirect()
  wp_sanitize_redirect()
  bb_safe_redirect()
  bb_nonce_tick()
  bb_verify_nonce()
  bb_create_nonce()
  _bb_get_key()
  _bb_get_salt()
  bb_salt()
  bb_hash()
  bb_hash_password()
  bb_check_password()
  bb_generate_password()
  bb_check_admin_referer()
  bb_check_ajax_referer()
  bb_break_password()
  bb_fix_password()
  bb_has_broken_pass()
  bb_new_user()
  bb_mail()
  bb_get_avatar()

Functions
Functions that are not part of a class:

bb_auth( $scheme = 'auth' )   X-Ref
No description

bb_check_login($user, $pass, $already_md5 = false)   X-Ref
No description

bb_get_current_user()   X-Ref
No description

bb_set_current_user( $id )   X-Ref
No description

bb_current_user()   X-Ref
No description

bb_is_user_authorized()   X-Ref
No description

bb_is_user_logged_in()   X-Ref
No description

bb_login( $login, $password, $remember = false )   X-Ref
No description

bb_logout()   X-Ref
No description

bb_validate_auth_cookie( $cookie = '', $scheme = 'auth' )   X-Ref
No description

bb_set_auth_cookie( $user_id, $remember = false, $schemes = false )   X-Ref
No description

bb_clear_auth_cookie()   X-Ref
No description

wp_redirect($location, $status = 302)   X-Ref
Redirects to another page, with a workaround for the IIS Set-Cookie bug.

param: string $location The path to redirect to
param: int $status Status code to use
return: bool False if $location is not set
since: 1.5.1

wp_sanitize_redirect($location)   X-Ref
Sanitizes a URL for use in a redirect.

return: string redirect-sanitized URL
since: 2.3

bb_safe_redirect( $location, $status = 302 )   X-Ref
Performs a safe (local) redirect, using wp_redirect().

Checks whether the $location is using an allowed host, if it has an absolute
path. A plugin can therefore set or remove allowed host(s) to or from the
list.

If the host is not allowed, then the redirect is to the site url
instead. This prevents malicious redirects which redirect to another host,
but only used in a few places.

return: void Does not return anything

bb_nonce_tick()   X-Ref
Get the time-dependent variable for nonce creation.

A nonce has a lifespan of two ticks. Nonces in their second tick may be
updated, e.g. by autosave.

return: int
since: 1.0

bb_verify_nonce($nonce, $action = -1)   X-Ref
Verify that correct nonce was used with time limit.

The user is given an amount of time to use the token, so therefore, since the
UID and $action remain the same, the independent variable is the time.

param: string $nonce Nonce that was used in the form to verify
param: string|int $action Should give context to what is taking place and be the same when nonce was created.
return: bool Whether the nonce check passed or failed.

bb_create_nonce($action = -1)   X-Ref
Creates a random, one time use token.

param: string|int $action Scalar value to add context to the nonce.
return: string The one use form token
since: 2.0.4

_bb_get_key( $key, $default_key = false )   X-Ref
No description

_bb_get_salt( $constants, $option = false )   X-Ref
No description

bb_salt( $scheme = 'auth' )   X-Ref
Get salt to add to hashes to help prevent attacks.

return: string Salt value for the given scheme
since: 0.9

bb_hash( $data, $scheme = 'auth' )   X-Ref
No description

bb_hash_password( $password )   X-Ref
No description

bb_check_password( $password, $hash, $user_id = '' )   X-Ref
No description

bb_generate_password( $length = 12, $special_chars = true )   X-Ref
Generates a random password drawn from the defined set of characters

return: string the password

bb_check_admin_referer( $action = -1, $query_arg = '_wpnonce' )   X-Ref
No description

bb_check_ajax_referer( $action = -1, $query_arg = false, $die = true )   X-Ref
No description

bb_break_password( $user_id )   X-Ref
No description

bb_fix_password( $user_id )   X-Ref
No description

bb_has_broken_pass( $user_id = 0 )   X-Ref
No description

bb_new_user( $user_login, $user_email, $user_url, $user_status = 1 )   X-Ref
No description

bb_mail( $to, $subject, $message, $headers = '', $attachments = array()   X-Ref
Send mail, similar to PHP's mail

A true return value does not automatically mean that the user received the
email successfully. It just only means that the method used was able to
process the request without any errors.

Using the two 'bb_mail_from' and 'bb_mail_from_name' hooks allow from
creating a from address like 'Name <email@address.com>' when both are set. If
just 'bb_mail_from' is set, then just the email address will be used with no
name.

The default content type is 'text/plain' which does not allow using HTML.
However, you can set the content type of the email by using the
'bb_mail_content_type' filter.

The default charset is based on the charset used on the blog. The charset can
be set using the 'bb_mail_charset' filter.

param: string $to Email address to send message
param: string $subject Email subject
param: string $message Message contents
param: string|array $headers Optional. Additional headers.
param: string|array $attachments Optional. Files to attach.
return: bool Whether the email contents were sent successfully.

bb_get_avatar( $id_or_email, $size = 80, $default = '', $alt = false )   X-Ref
Retrieve the avatar for a user provided a user ID or email address

param: int|string $id_or_email A user ID or email address
param: int $size Size of the avatar image
param: string $default URL to a default image to use if no avatar is available
param: string $alt Alternate text to use in image tag. Defaults to blank
return: string <img> tag for the user's avatar
since: 0.9



Generated: Thu Dec 7 01:01:35 2017 Cross-referenced by PHPXref 0.7.1