Folks_Driver:: defines an API for implementing storage backends for
Folks.
Copyright Obala d.o.o. (www.obala.si)
See the enclosed file COPYING for license information (GPL). If you
did not receive this file, see http://www.horde.org/licenses/gpl.
Methods summary
public
Folks_Driver
|
#
factory( string $driver = null, array $params = null )
Attempts to return a concrete Folks_Driver instance based on $driver.
Attempts to return a concrete Folks_Driver instance based on $driver.
Parameters
- $driver
- <p>The type of the concrete Folks_Driver subclas
to return. The clas name is based on the
storage driver ($driver). The code is
dynamically included.</p>
- $params
- <p>A hash containing any additional configuration
or connection parameters a subclas might need.</p>
Returns
Folks_Driver
The newly created concrete Folks_Driver
instance, or false on an error.
|
public
|
#
deleteImage( string $user )
Delete user image
Parameters
- $user
- User pricture belongs to
|
public
array
|
|
public
boolean
|
|
public
array
|
|
public
array
|
#
getNewUsers( mixed $limit = 10 )
Get last signed up users
Returns
array users online
|
public
array
|
#
getRandomUsers( integer $limit = 10, boolean $online = true )
Get random users
Parameters
- $limit
- Username to check
- $online
- User is online?
Returns
array users
|
public
boolean
|
#
isOnline( string $user )
Check if a user is online
Check if a user is online
Parameters
Returns
boolean
|
public
|
|
public
|
#
getRawProfile( mixed $user )
Get raw profile of current user
Get raw profile of current user
|
public
|
#
getProfile( string $user = null )
Get user profile
Parameters
|
public
|
#
changePassword( string $password, string $user = null )
Change user password
Parameters
- $password
- Plain password
- $user
- Username
|
public
|
#
saveProfile( array $data, string $user = null )
Save user profile
Parameters
- $data
- Profile data
- $user
- Username
|
public
boolean
|
#
logView( string $id )
Logs a user view.
Parameters
Returns
boolean True, if the view was logged, false if the mesage was aleredy seen
|
public
boolean
|
#
deleteUser( string $user )
Delete user
Parameters
Returns
boolean
|
public
|
#
getAttributes( string $user = null, string $group = null )
Get user attributes
Parameters
- $user
- Username
- $group
- Only a specific group
|
public
|
#
saveAttributes( array $data, string $group, string $user = null )
Save user attributes
Parameters
- $data
- Attributes data
- $group
- $user Username
- $user
- $group Only a specific group
|
public
boolean
|
#
comparePassword( string $user, string $plaintext )
Compare an encrypted pasword to a plaintext string to see if
they match.
Compare an encrypted pasword to a plaintext string to see if
they match.
Parameters
- $user
- Username
- $plaintext
- The plaintext pasword to verify.
Returns
boolean True if matched, false otherwise.
|
public
string
|
#
getCookie( string $user )
Get encripted cookie login string
Get encripted cookie login string
Parameters
- $user
- Username to get cookie for
Returns
string Encripted
|
public
string
|
#
getConfirmationCode( string $user, string $type = 'activate' )
Get confirmation code
Parameters
- $user
- Username to get code for
- $type
- Code type
Returns
string Confirmation code
|
public
|
#
saveSearch( string $criteria, string $name )
Save search criteria
Parameters
- $criteria
- Search criteria
- $name
- Search name
|
public
array
|
|
public
array
|
#
getSearchCriteria( string $name )
Get saved search criteria
Get saved search criteria
Parameters
Returns
array search criteria
|
public
|
|
public
true
|
#
logActivity( string $message, string $scope = 'folks', string $user = null )
Log users activity
Parameters
- $message
- Activity message
- $scope
- Scope
- $user
- $user
Returns
true on success
|
public
array
|
#
getActivity( string $user, integer $limit = 10 )
Get user's activity
Parameters
- $user
- Username
- $limit
- Number of actions to return
Returns
array Activity log
|
public
true
|
#
deleteActivity( string $scope, integer $date )
Delete users activity
Parameters
Returns
true on success
|