Public Member Functions

UserXMLParser Class Reference
[Plugins_importexport_users]

Class to import and export user data from an XML format. See dbscripts/xml/dtd/users.dtd for the XML schema used. More...

List of all members.

Public Member Functions

 generatePassword (&$user)
 generatePassword (&$user)
 generateUsername (&$user)
 generateUsername (&$user)
getErrors ()
getErrors ()
getImportedUsers ()
getImportedUsers ()
getUsersToImport ()
getUsersToImport ()
 importUsers ($sendNotify=false, $continueOnError=false)
 importUsers ($sendNotify=false, $continueOnError=false)
parseData ($file)
parseData ($file)
 setUsersToImport ($users)
 setUsersToImport ($users)
 UserXMLParser ($pressId)
 UserXMLParser ($pressId)
 validRole ($roleType)
 validRole ($roleType)

Detailed Description

Class to import and export user data from an XML format. See dbscripts/xml/dtd/users.dtd for the XML schema used.

Definition at line 20 of file UserXMLParser.inc.php.


Member Function Documentation

UserXMLParser.generatePassword ( &$  user  ) 

Generate a random password for a user.

Parameters:
$user ImportedUser the user to be modified by this function

Definition at line 367 of file UserXMLParser.inc.php.

References Validation.encryptCredentials().

Referenced by generatePassword(), and importUsers().

UserXMLParser.generatePassword ( &$  user  ) 

Generate a random password for a user.

Parameters:
$user ImportedUser the user to be modified by this function

Definition at line 367 of file UserXMLParser.inc.php.

References Validation.encryptCredentials(), and generatePassword().

UserXMLParser.generateUsername ( &$  user  ) 

Generate a unique username for a user based on the user's name.

Parameters:
$user ImportedUser the user to be modified by this function

Definition at line 346 of file UserXMLParser.inc.php.

UserXMLParser.generateUsername ( &$  user  ) 

Generate a unique username for a user based on the user's name.

Parameters:
$user ImportedUser the user to be modified by this function

Definition at line 346 of file UserXMLParser.inc.php.

Referenced by importUsers().

& UserXMLParser.getErrors (  ) 

Return an array of error messages that occurred during the import.

Returns:
array string

Definition at line 328 of file UserXMLParser.inc.php.

& UserXMLParser.getErrors (  ) 

Return an array of error messages that occurred during the import.

Returns:
array string

Definition at line 328 of file UserXMLParser.inc.php.

& UserXMLParser.getImportedUsers (  ) 

Return the set of users who were successfully imported.

Returns:
array ImportedUsers

Definition at line 320 of file UserXMLParser.inc.php.

& UserXMLParser.getImportedUsers (  ) 

Return the set of users who were successfully imported.

Returns:
array ImportedUsers

Definition at line 320 of file UserXMLParser.inc.php.

& UserXMLParser.getUsersToImport (  ) 

Return the set of parsed users.

Returns:
array ImportedUsers

Definition at line 304 of file UserXMLParser.inc.php.

& UserXMLParser.getUsersToImport (  ) 

Return the set of parsed users.

Returns:
array ImportedUsers

Definition at line 304 of file UserXMLParser.inc.php.

UserXMLParser.importUsers ( sendNotify = false,
continueOnError = false 
)

Import the parsed users into the system.

Parameters:
$sendNotify boolean send an email notification to each imported user containing their username and password
$continueOnError boolean continue to import remaining users if a failure occurs
Returns:
boolean success

Definition at line 184 of file UserXMLParser.inc.php.

References Validation.encryptCredentials(), generatePassword(), and generateUsername().

UserXMLParser.importUsers ( sendNotify = false,
continueOnError = false 
)

Import the parsed users into the system.

Parameters:
$sendNotify boolean send an email notification to each imported user containing their username and password
$continueOnError boolean continue to import remaining users if a failure occurs
Returns:
boolean success

Definition at line 184 of file UserXMLParser.inc.php.

References Validation.encryptCredentials(), generatePassword(), and generateUsername().

& UserXMLParser.parseData ( file  ) 

Parse an XML users file into a set of users to import.

Parameters:
$file string path to the XML file to parse
Returns:
array ImportedUsers the collection of users read from the file

Definition at line 51 of file UserXMLParser.inc.php.

References validRole().

& UserXMLParser.parseData ( file  ) 

Parse an XML users file into a set of users to import.

Parameters:
$file string path to the XML file to parse
Returns:
array ImportedUsers the collection of users read from the file

Definition at line 51 of file UserXMLParser.inc.php.

References validRole().

Referenced by UserImportExportPlugin.executeCLI().

UserXMLParser.setUsersToImport ( users  ) 

Specify the set of parsed users.

Parameters:
$usersToImport ImportedUsers

Definition at line 312 of file UserXMLParser.inc.php.

UserXMLParser.setUsersToImport ( users  ) 

Specify the set of parsed users.

Parameters:
$usersToImport ImportedUsers

Definition at line 312 of file UserXMLParser.inc.php.

UserXMLParser.UserXMLParser ( pressId  ) 

Constructor.

Parameters:
$pressId int assumed to be a valid press ID

Definition at line 41 of file UserXMLParser.inc.php.

UserXMLParser.UserXMLParser ( pressId  ) 

Constructor.

Parameters:
$pressId int assumed to be a valid press ID

Definition at line 41 of file UserXMLParser.inc.php.

UserXMLParser.validRole ( roleType  ) 

Check if a role type value identifies a valid role that can be imported. Note we do not allow users to be imported into the "admin" role.

Parameters:
$roleType string
Returns:
boolean

Definition at line 338 of file UserXMLParser.inc.php.

Referenced by parseData().

UserXMLParser.validRole ( roleType  ) 

Check if a role type value identifies a valid role that can be imported. Note we do not allow users to be imported into the "admin" role.

Parameters:
$roleType string
Returns:
boolean

Definition at line 338 of file UserXMLParser.inc.php.


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