CWIS Developer Documentation

- Home
- Main Page
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Attributes | List of all members
CWUserFactory Class Reference

CWIS-specific user factory class. More...

Inheritance diagram for CWUserFactory:
[legend]
Collaboration diagram for CWUserFactory:
[legend]

## Public Member Functions
| __construct ()
| Construct the user factory object. More...
| GetTopContributors ($Limit=5)
| Get a list of users sorted by how many resources they have added or edited, starting with those who have added/edited the most. More...
| GetMostRecentContributors ($Limit=5)
| Get the users sorted by when they last added or edited a resource starting with those who added/edited a resource most recently. More...
| CreateNewUser ($UserName, $Password, $PasswordAgain, $EMail, $EMailAgain, $IgnoreErrorCodes=NULL)
| Create a new user. More...
Public Member Functions inherited from UserFactory
| UserFactory ()
| Object constructor. More...
| CreateNewUser ($UserName, $Password, $PasswordAgain, $EMail, $EMailAgain, $IgnoreErrorCodes=NULL)
| Create new user. More...
| TestNewUserValues ($UserName, $Password, $PasswordAgain, $EMail, $EMailAgain)
| GetUserCount ($Condition=NULL)
| Return number of users in the system. More...
| GetMatchingUserCount ()
| GetLoggedInUsers ($InactivityTimeout=60)
| Get users who are currently logged in (i.e. More...
| GetRecentlyLoggedInUsers ($Since=NULL, $Limit=10)
| GetUsersWithPrivileges ()
| Return array of user names who have the specified privileges. More...
| FindUsers ($SearchString, $FieldName="UserName", $SortFieldName="UserName", $Offset=0, $Count=9999999)
| FindUserNames ($SearchString, $FieldName="UserName", $SortFieldName="UserName", $Offset=0, $Count=9999999, $IdExclusions=array(), $ValueExclusions=array())
| GetMatchingUsers ($SearchString, $FieldName=NULL, $SortFieldName="UserName", $ResultsStartAt=0, $ReturnNumber=NULL)
| UserNameExists ($UserName)
| EMailAddressIsInUse ($Address)
| GetNewestUsers ($Limit=5)
| Get the users sorted by when they signed up, starting with those who signed up most recently. More...
| CompareUsersForSort ($UserA, $UserB)

## Protected Attributes
| $ResourceFactory
| The resource factory for user resources. More...

## Additional Inherited Members
Public Attributes inherited from UserFactory
| $DB
| $SortFieldName
| $MatchingUserCount

## Detailed Description

CWIS-specific user factory class.

Definition at line 13 of file CWUserFactory.php.

## Constructor & Destructor Documentation

CWUserFactory::__construct | ( |  | ) |

Construct the user factory object.

Definition at line 20 of file CWUserFactory.php.

References MetadataSchema\SCHEMAID_USER.

## Member Function Documentation

CWUserFactory::CreateNewUser | ( |  | $UserName,
|  |  | $Password,
|  |  | $PasswordAgain,
|  |  | $EMail,
|  |  | $EMailAgain,
|  |  | $IgnoreErrorCodes = `NULL`
| ) |  |

Create a new user.

The second password and e-mail address parameters are intended for second copies of each entered by the user.

Parameters

  string | $UserName | Login name for new user.
  string | $Password | Password for new user.
  string | $PasswordAgain | Second copy of password entered by user.
  string | $EMail | E-mail address for new user.
  string | $EMailAgain | Second copy of e-mail address entered by user.
  bool | $IgnoreErrorCodes | Array containing any error codes that should be ignored. (OPTIONAL)

Returns
  CWUser object or array of error codes.

Definition at line 104 of file CWUserFactory.php.

References Resource\Create(), MetadataSchema\MDFTYPE_TIMESTAMP, MetadataSchema\SCHEMAID_USER, U_OKAY, and MetadataField\UPDATEMETHOD_ONRECORDEDIT.

CWUserFactory::GetMostRecentContributors | ( |  | $Limit = `5` | ) |

Get the users sorted by when they last added or edited a resource starting with those who added/edited a resource most recently.

Parameters

  int | $Limit | The maximum number of users to return. (OPTIONAL, defaults to 5.)

Returns
  array List of users, with user IDs for the index and CWUser objects for the values.

Definition at line 66 of file CWUserFactory.php.

CWUserFactory::GetTopContributors | ( |  | $Limit = `5` | ) |

Get a list of users sorted by how many resources they have added or edited, starting with those who have added/edited the most.

Parameters

  int | $Limit | The maximum number of users to return. (OPTIONAL, defaults to 5.)

Returns
  array List of users, with user IDs for the index and CWUser objects for the values.

Definition at line 34 of file CWUserFactory.php.

## Member Data Documentation

CWUserFactory::$ResourceFactory
| protected

The resource factory for user resources.

Definition at line 163 of file CWUserFactory.php.

The documentation for this class was generated from the following file:

- objects/CWUserFactory.php