[ Index ]

PHP Cross Reference of Joomla 2.5.4 DE

title

Body

[close]

/libraries/joomla/user/ -> helper.php (summary)

(no description)

Copyright: Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
License: GNU General Public License version 2 or later; see LICENSE
File Size: 594 lines (15 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 12 functions

  addUserToGroup()
  getUserGroups()
  removeUserFromGroup()
  setUserGroups()
  getProfile()
  activateUser()
  getUserId()
  getCryptedPassword()
  getSalt()
  genRandomPassword()
  _toAPRMD5()
  _bin()

Functions
Functions that are not part of a class:

addUserToGroup($userId, $groupId)   X-Ref
Method to add a user to a group.

param: integer  $userId   The id of the user.
param: integer  $groupId  The id of the group.
return: mixed  Boolean true on success, Exception on error.

getUserGroups($userId)   X-Ref
Method to get a list of groups a user is in.

param: integer  $userId  The id of the user.
return: mixed  Array on success, JException on error.

removeUserFromGroup($userId, $groupId)   X-Ref
Method to remove a user from a group.

param: integer  $userId   The id of the user.
param: integer  $groupId  The id of the group.
return: mixed  Boolean true on success, JException on error.

setUserGroups($userId, $groups)   X-Ref
Method to set the groups for a user.

param: integer  $userId  The id of the user.
param: array    $groups  An array of group ids to put the user in.
return: mixed  Boolean true on success, Exception on error.

getProfile($userId = 0)   X-Ref
Gets the user profile information

param: integer  $userId  The id of the user.
return: object

activateUser($activation)   X-Ref
Method to activate a user

param: string  $activation  Activation string
return: boolean  True on success

getUserId($username)   X-Ref
Returns userid if a user exists

param: string  $username  The username to search on.
return: integer  The user id or 0 if not found.

getCryptedPassword($plaintext, $salt = '', $encryption = 'md5-hex', $show_encrypt = false)   X-Ref
Formats a password using the current encryption.

param: string   $plaintext     The plaintext password to encrypt.
param: string   $salt          The salt to use to encrypt the password. []
param: string   $encryption    The kind of password encryption to use.
param: boolean  $show_encrypt  Some password systems prepend the kind of
return: string  The encrypted password.

getSalt($encryption = 'md5-hex', $seed = '', $plaintext = '')   X-Ref
Returns a salt for the appropriate kind of password encryption.
Optionally takes a seed and a plaintext password, to extract the seed
of an existing password, or for encryption types that use the plaintext
in the generation of the salt.

param: string  $encryption  The kind of password encryption to use.
param: string  $seed        The seed to get the salt from (probably a
param: string  $plaintext   The plaintext password that we're generating
return: string  The generated or extracted salt.

genRandomPassword($length = 8)   X-Ref
Generate a random password

param: integer  $length  Length of the password to generate
return: string  Random Password

_toAPRMD5($value, $count)   X-Ref
Converts to allowed 64 characters for APRMD5 passwords.

param: string   $value  The value to convert.
param: integer  $count  The number of characters to convert.
return: string  $value converted to the 64 MD5 characters.

_bin($hex)   X-Ref
Converts hexadecimal string to binary data.

param: string  $hex  Hex data.
return: string  Binary data.



Generated: Tue Apr 3 11:40:28 2012 Cross-referenced by PHPXref 0.7.1