[ Index ]

PHP Cross Reference of BBPress

title

Body

[close]

/src/includes/users/ -> functions.php (summary)

bbPress User Functions

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

Defines 27 functions

  bbp_redirect_login()
  bbp_is_anonymous()
  bbp_current_anonymous_user_data()
  bbp_get_current_anonymous_user_data()
  bbp_set_current_anonymous_user_data()
  bbp_current_author_ip()
  bbp_current_author_ua()
  bbp_edit_user_handler()
  bbp_user_email_change_handler()
  bbp_edit_user_email_send_notification()
  bbp_user_edit_after()
  bbp_get_user_topics_started()
  bbp_get_user_replies_created()
  bbp_get_user_ids_from_nicenames()
  bbp_get_user_nicenames_from_ids()
  bbp_get_user_topic_count_raw()
  bbp_get_user_reply_count_raw()
  bbp_bump_user_topic_count()
  bbp_bump_user_reply_count()
  bbp_increase_user_topic_count()
  bbp_increase_user_reply_count()
  bbp_decrease_user_topic_count()
  bbp_decrease_user_reply_count()
  bbp_check_user_edit()
  bbp_forum_enforce_blocked()
  bbp_sanitize_displayed_user_field()
  bbp_user_maybe_convert_pass()

Functions
Functions that are not part of a class:

bbp_redirect_login( $url = '', $raw_url = '', $user = '' )   X-Ref
Redirect back to $url when attempting to use the login page

since: 2.0.0 bbPress (r2815)
param: string $url The url
param: string $raw_url Raw url
param: object $user User object

bbp_is_anonymous()   X-Ref
Is an anonymous topic/reply being made?

since: 2.0.0 bbPress (r2688)
return: bool True if anonymous is allowed and user is not logged in, false if

bbp_current_anonymous_user_data( $key = '' )   X-Ref
Echoes the values for current poster (uses WP comment cookies)

since: 2.0.0 bbPress (r2734)
param: string $key Which value to echo?

bbp_get_current_anonymous_user_data( $key = '' )   X-Ref
Get the cookies for current poster (uses WP comment cookies).

since: 2.0.0 bbPress (r2734)
return: string|array Cookie(s) for current poster
param: string $key Optional. Which value to get? If not given, then

bbp_set_current_anonymous_user_data( $anonymous_data = array()   X-Ref
Set the cookies for current poster (uses WP comment cookies)

since: 2.0.0 bbPress (r2734)
param: array $anonymous_data Optional - if it's an anonymous post. Do not

bbp_current_author_ip()   X-Ref
Get the poster IP address

since: 2.0.0 bbPress (r3120)
since: 2.6.0 bbPress (r5609) Added `empty()` check for unit tests
return: string

bbp_current_author_ua()   X-Ref
Get the poster user agent

since: 2.0.0 bbPress (r3446)
return: string

bbp_edit_user_handler( $action = '' )   X-Ref
Handles the front end user editing from POST requests

since: 2.0.0 bbPress (r2790)
param: string $action The requested action to compare this function to

bbp_user_email_change_handler( $action = '' )   X-Ref
Handles user email address updating from GET requests

since: 2.6.0 bbPress (r5660)
param: string $action

bbp_edit_user_email_send_notification( $user_id = 0, $args = array()   X-Ref
Sends an email when an email address change occurs on POST requests

since: 2.6.0 bbPress (r5660)

bbp_user_edit_after()   X-Ref
Conditionally hook the core WordPress output actions to the end of the
default user's edit profile template

This allows clever plugin authors to conditionally unhook the WordPress core
output actions if they don't want any unexpected junk to appear there, and
also avoids needing to pollute the templates with additional logic and actions.

since: 2.2.0 bbPress (r4273)

bbp_get_user_topics_started( $args = array()   X-Ref
Get the topics that a user created

since: 2.0.0 bbPress (r2660)
since: 2.6.0 bbPress (r6618) Signature changed to accept an array of arguments
return: bool True if user has started topics, otherwise false
param: array $args    Optional. Arguments to pass into bbp_has_topics()

bbp_get_user_replies_created( $args = array()   X-Ref
Get the replies that a user created

since: 2.2.0 bbPress (r4225)
since: 2.6.0 bbPress (r6618) Signature changed to accept an array of arguments
return: bool True if user has created replies, otherwise false
param: array $args Optional. Arguments to pass into bbp_has_replies()

bbp_get_user_ids_from_nicenames( $user_nicenames = array()   X-Ref
Get user IDs from nicenames

This function is primarily used when saving object moderators

since: 2.6.0 bbPress
return: array
param: mixed $user_nicenames

bbp_get_user_nicenames_from_ids( $user_ids = array()   X-Ref
Get user nicenames from IDs

This function is primarily used when saving object moderators

since: 2.6.0 bbPress
return: array
param: mixed $user_ids

bbp_get_user_topic_count_raw( $user_id = 0 )   X-Ref
Return the raw database count of topics by a user

since: 2.1.0 bbPress (r3633)
return: int Raw DB count of topics
param: int $user_id User ID to get count for

bbp_get_user_reply_count_raw( $user_id = 0 )   X-Ref
Return the raw database count of replies by a user

since: 2.1.0 bbPress (r3633)
return: int Raw DB count of replies
param: int $user_id User ID to get count for

bbp_bump_user_topic_count( $user_id = 0, $difference = 1 )   X-Ref
Bump the topic count for a user by a certain amount.

since: 2.6.0 bbPress (r5309)
param: int $user_id
param: int $difference

bbp_bump_user_reply_count( $user_id = 0, $difference = 1 )   X-Ref
Bump the reply count for a user by a certain amount.

since: 2.6.0 bbPress (r5309)
param: int $user_id
param: int $difference

bbp_increase_user_topic_count( $topic_id = 0 )   X-Ref
Helper function used to increase (by one) the count of topics for a user when
a topic is published.

since: 2.6.0 bbPress (r5309)
param: $topic_id
param: $forum_id
param: $anonymous_data
param: $topic_author

bbp_increase_user_reply_count( $reply_id = 0 )   X-Ref
Helper function used to increase (by one) the count of replies for a user when
a reply is published.

This is a helper function, hooked to `bbp_new_reply`

since: 2.6.0 bbPress (r5309)
param: $topic_id
param: $forum_id
param: $anonymous_data
param: $topic_author

bbp_decrease_user_topic_count( $topic_id = 0 )   X-Ref
Helper function used to decrease (by one) the count of topics for a user when
a topic is unpublished.

since: 2.6.0 bbPress (r5309)
param: $topic_id

bbp_decrease_user_reply_count( $reply_id = 0 )   X-Ref
Helper function used to increase (by one) the count of replies for a user when
a topic is unpublished.

since: 2.6.0 bbPress (r5309)
param: $reply_id

bbp_check_user_edit()   X-Ref
Redirect if unauthorized user is attempting to edit another user

This is hooked to 'bbp_template_redirect' and controls the conditions under
which a user can edit another user (or themselves.) If these conditions are
met, we assume a user cannot perform this task, and look for ways they can
earn the ability to access this template.

since: 2.1.0 bbPress (r3605)

bbp_forum_enforce_blocked()   X-Ref
Check if a user is blocked, or cannot spectate the forums.

since: 2.0.0 bbPress (r2996)

bbp_sanitize_displayed_user_field( $value = '', $field = '', $context = 'display' )   X-Ref
Sanitize displayed user data, when viewing and editing any user.

This somewhat monolithic function handles the escaping and sanitization of
user data for a bbPress profile. There are two reasons this all happens here:

1. bbPress took a similar approach to WordPress, and funnels all user profile
data through a central helper. This eventually calls sanitize_user_field()
which applies a few context based filters, which some third party plugins
might be relying on bbPress to play nicely with.

2. Early versions of bbPress 2.x templates did not escape this data meaning
a backwards compatible approach like this one was necessary to protect
existing installations that may have custom template parts.

since: 2.6.0 bbPress (r5368)
return: string
param: string $value
param: string $field
param: string $context

bbp_user_maybe_convert_pass()   X-Ref
Convert passwords from previous platform encryption to WordPress encryption.

since: 2.1.0 bbPress (r3813)



Generated: Thu Sep 19 01:01:28 2019 Cross-referenced by PHPXref 0.7.1