/sources/users.php

Description
Functions
delete_expired_sessions (line 548)

Find what sessions are expired and delete them.

  • return: The session id we rebound to (NULL: did not rebind)
?AUTO_LINK delete_expired_sessions ([?MEMBER $id = NULL])
  • ?MEMBER $id: User to get a current session for (NULL: do not try, which guarantees a return result of NULL also)
enforce_sessioned_url (line 632)

Make sure that the given URL contains a session if cookies are disabled.

NB: This is used for login redirection. It had to add the session id into the redirect url.

  • return: The fixed URL (potentially nothing was done, depending on cookies)
URLPATH enforce_sessioned_url (URLPATH $url)
  • URLPATH $url: The URL to enforce results in session persistence for the user
get_member (line 308)

Get the ID of the currently active member.

It see's if the session exists / cookie is valid -- and gets the member id accordingly

  • return: The member requesting this web page (possibly the guest member - which strictly speaking, is not a member)
MEMBER get_member ()
get_member_cookie (line 591)

Get the member cookie's name.

  • return: The member username/id (depending on forum driver) cookie's name
string get_member_cookie ()
get_ocp_cpf (line 95)

Get the value of a special 'ocp_' custom profile field.

  • return: The value (blank: has a blank value, or does not exist)
string get_ocp_cpf (ID_TEXT $cpf, [?MEMBER $member = NULL])
  • ID_TEXT $cpf: The CPF name stem
  • ?MEMBER $member: Member to lookup for (NULL: current member)
get_online_members (line 170)

Get database rows of all the online members.

  • return: Database rows (NULL: too many)
?array get_online_members (boolean $longer_time, ?MEMBER $filter, integer &$count)
  • boolean $longer_time: Whether to use a longer online-time -- the session expiry-time
  • ?MEMBER $filter: We really only need to make sure we get the status for this user, although at this functions discretion more may be returned and the row won't be there if the user is not online (NULL: no filter). May not be the guest ID
  • integer &$count: The total online members, returned by reference
get_pass_cookie (line 603)

Get the member password cookie's name.

  • return: The member password cookie's name
string get_pass_cookie ()
get_session_id (line 615)

Get the current session ID.

  • return: The current session ID
integer get_session_id ()
handle_logins (line 278)

Handles an attempted login or logout, and take care of all the sessions and cookies etc.

void handle_logins ()
init__users (line 26)

Standard code module initialisation function.

void init__users ()
is_httpauth_login (line 117)

Find whether the current member is logged in via httpauth.

  • return: Whether the current member is logged in via httpauth
boolean is_httpauth_login ()
member_blocked (line 236)

Find if a member is blocked by a member.

  • return: Whether the member is blocked
boolean member_blocked (MEMBER $member_id, [?MEMBER $member_blocker = NULL])
  • MEMBER $member_id: The member being checked
  • ?MEMBER $member_blocker: The member who may be blocking (NULL: current member)
member_is_online (line 218)

Find if a member is online.

  • return: Whether they are online
boolean member_is_online (MEMBER $member_id)
  • MEMBER $member_id: The member to check
my_md5 (line 156)

Apply hashing to some input. To this date, all forum drivers use md5, but some (well, currently SMF) use it differently.

This function will pass through the parameters to an equivalent forum_md5 function if it is defined.

  • return: The hashed data
string my_md5 (string $data, string $key)
  • string $data: The data to hash (the password in actuality)
  • string $key: The string converted member-ID in actuality, although this function is more general
ocp_admirecookie (line 649)

Get a cookie value.

  • return: The value stored in the cookie (NULL: the default default)
?string ocp_admirecookie (string $name, [?string $default = NULL])
  • string $name: The name of the cookie
  • ?string $default: The default value (NULL: just use the value NULL)
ocp_eatcookie (line 663)

Deletes a cookie (if it exists), from within ocPortal's cookie environment.

  • return: The result of the PHP setcookie command
boolean ocp_eatcookie (string $name)
  • string $name: The name of the cookie

Documentation generated on Sun, 02 Jan 2011 23:27:53 +0000 by phpDocumentor 1.4.3