[ Index ]

PHP Cross Reference of BackPress

title

Body

[close]

/includes/ -> class.wp-auth.php (summary)

(no description)

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

Defines 1 class

WP_Auth:: (8 methods):
  WP_Auth()
  __construct()
  set_current_user()
  get_current_user()
  validate_auth_cookie()
  generate_auth_cookie()
  set_auth_cookie()
  clear_auth_cookie()


Class: WP_Auth  - X-Ref

WP_Auth( &$db, &$users, $cookies )   X-Ref
No description

__construct( &$db, &$users, $cookies )   X-Ref

param: array $cookies Array indexed by internal name of cookie.  Values are arrays of array defining cookie parameters.

set_current_user( $user_id )   X-Ref
Changes the current user by ID or name

Set $id to null and specify a name if you do not know a user's ID

Some WordPress functionality is based on the current user and
not based on the signed in user. Therefore, it opens the ability
to edit and perform actions on users who aren't signed in.

since: 2.0.4
param: int $id User ID
param: string $name User's username
return: BP_User Current user User object

get_current_user()   X-Ref
Populate variables with information about the currently logged in user

Will set the current user, if the current user is not set. The current
user will be set to the logged in person. If no user is logged in, then
it will set the current user to 0, which is invalid and won't have any
permissions.

since: 0.71
return: bool|null False on XMLRPC Request and invalid auth cookie. Null when current user set

validate_auth_cookie( $cookie = null, $scheme = 'auth' )   X-Ref
Validates authentication cookie

The checks include making sure that the authentication cookie
is set and pulling in the contents (if $cookie is not used).

Makes sure the cookie is not expired. Verifies the hash in
cookie is what is should be and compares the two.

since: 2.5
param: string $cookie Optional. If used, will validate contents instead of cookie's
return: bool|int False if invalid cookie, User ID if valid.

generate_auth_cookie( $user_id, $expiration, $scheme = 'auth' )   X-Ref
Generate authentication cookie contents

since: 2.5
param: int $user_id User ID
param: int $expiration Cookie expiration in seconds
return: string Authentication cookie contents

set_auth_cookie( $user_id, $expiration = 0, $expire = 0, $scheme = 'auth' )   X-Ref
Sets the authentication cookies based User ID

The $remember parameter increases the time that the cookie will
be kept. The default the cookie is kept without remembering is
two days. When $remember is set, the cookies will be kept for
14 days or two weeks.

since: 2.5
param: int $user_id User ID
param: int $expiration the UNIX time after which the cookie's authentication token is no longer valid
param: int $expire the UNIX time at which the cookie expires
param: int $scheme name of the

clear_auth_cookie()   X-Ref
Deletes all of the cookies associated with authentication

since: 2.5



Generated: Wed Dec 19 01:01:51 2018 Cross-referenced by PHPXref 0.7.1