Public Member Functions | |
| generatePassword (&$user) | |
| generateUsername (&$user) | |
| & | getErrors () |
| & | getImportedUsers () |
| & | getUsersToImport () |
| importUsers ($sendNotify=false, $continueOnError=false) | |
| & | parseData ($file) |
| setUsersToImport ($users) | |
| UserXMLParser ($journalId) | |
| validRole ($roleType) | |
Definition at line 21 of file UserXMLParser.inc.php.
| UserXMLParser.generatePassword | ( | &$ | user | ) |
Generate a random password for a user.
| $user | ImportedUser the user to be modified by this function |
Definition at line 356 of file UserXMLParser.inc.php.
References Validation.encryptCredentials(), and Validation.generatePassword().
Referenced by importUsers().
| UserXMLParser.generateUsername | ( | &$ | user | ) |
Generate a unique username for a user based on the user's name.
| $user | ImportedUser the user to be modified by this function |
Definition at line 335 of file UserXMLParser.inc.php.
References DAORegistry.getDAO(), and String.regexp_replace().
Referenced by importUsers().
| & UserXMLParser.getErrors | ( | ) |
Return an array of error messages that occurred during the import.
Definition at line 317 of file UserXMLParser.inc.php.
| & UserXMLParser.getImportedUsers | ( | ) |
Return the set of users who were successfully imported.
Definition at line 309 of file UserXMLParser.inc.php.
| & UserXMLParser.getUsersToImport | ( | ) |
Return the set of parsed users.
Definition at line 293 of file UserXMLParser.inc.php.
| UserXMLParser.importUsers | ( | $ | sendNotify = false, |
|
| $ | continueOnError = false | |||
| ) |
Import the parsed users into the system.
| $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 |
Definition at line 178 of file UserXMLParser.inc.php.
References Validation.encryptCredentials(), generatePassword(), generateUsername(), DAORegistry.getDAO(), and Locale.translate().
| & UserXMLParser.parseData | ( | $ | file | ) |
Parse an XML users file into a set of users to import.
| $file | string path to the XML file to parse |
Definition at line 52 of file UserXMLParser.inc.php.
References DAORegistry.getDAO(), Locale.getPrimaryLocale(), Request.getSite(), Config.getVar(), Locale.isLocaleValid(), Locale.translate(), and validRole().
| UserXMLParser.setUsersToImport | ( | $ | users | ) |
Specify the set of parsed users.
| $usersToImport | ImportedUsers |
Definition at line 301 of file UserXMLParser.inc.php.
| UserXMLParser.UserXMLParser | ( | $ | journalId | ) |
Constructor.
| $journalId | int assumed to be a valid journal ID |
Definition at line 42 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.
| $roleType | string |
Definition at line 327 of file UserXMLParser.inc.php.
Referenced by parseData().
1.5.6