[ Index ]

PHP Cross Reference of BackPress




/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):

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.

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

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

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

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.

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

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

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

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.

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
since: 2.5

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

since: 2.5

Generated: Thu May 30 01:01:03 2024 Cross-referenced by PHPXref 0.7.1