<<

NAME

MT::BulkCreation - Utility package for managing the bulk user create, update, delete facility.

DESCRIPTION

This module handles the Bulk User management operations of Movable Type.

METHODS

$obj->do_bulk_create(%param)

Parameters for this method:

  • App

    The parent MT::App application that is driving the process.

  • Callback

    A coderef of a routine that is used to send progress messages back from this module. The callback routine is simply given a string containing a message to relay to the end user.

  • Line

    An array reference of data from current line of the import file being processed.

  • LineNumber

    The current line number of the file being processed.

The 'Line' parameter is a data line in CSV format from the import file being processed. This module processes three varieties of input data, all beginning with an identifier that specifies the type of line being processed. That first element is one of: register, update, delete.

Based on this command column, the appropriate method is called to parse the rest of the line and apply the updates to the user table.

$obj->register($app, @line_data)

Processes a bulk user record of the 'register' type. Records processed with a 'register' command will create new Movable Type user accounts. The line is expected to be in CSV format and contains the following columns:

  • register

    The literal word "register".

  • username

    The username of the user to create.

  • display name

    The name used when publishing the name of the author.

  • email

    The contact email address for this user.

  • language

    The language to assign to the new user account. Valid choices include: en, ja, de, es, fr, nl (or if you have other MT localization packs installed, those language codes would be also valid).

  • password

    A password the user will use to login to Movable Type.

  • hint

    A recovery hint the user can use to reset their password. The user must know this hint in order to reset their password.

  • blog name

    The name to assign to a weblog that will be created and assigned to this user.

  • description

    The description to assign to their weblog.

  • site url

    The site URL to assign to their weblog.

  • site path

    The site root path to assign to their weblog.

  • timezone

    The timezone to assign to their weblog.

Note that the weblog fields (blog name, description, site url, site path and timezone) may be blank if you do not wish to create a personal weblog for the user being created. However, all columns must be in the input record.

$obj->update($app, @line_data)

Processes a bulk user record of the 'update' type. Records processed with a 'update' command will update existing Movable Type user accounts. The line is expected to be in CSV format and contains the following columns:

  • update

    The literal word "update".

  • username

    The username of the user to update. This must match with an existing user account.

  • display name

    The new display name to assign to this user.

  • email

    The new contact email address to assign to this user.

  • language

    The new language to assign to the this user. Valid choices include: en, ja, de, es, it, fr, nl.

  • password

    A new password to assign to this user.

  • hint

    A new recovery hint to assign to this user.

$obj->delete($app, @line_data)

Processes a bulk user record of the 'delete' type. Records processed with a 'delete' command will delete existing Movable Type user accounts. The line is expected to be in CSV format and contains the following columns:

  • delete

    The literal word "delete".

  • username

    The username of the user to delete. This must match with an existing user account.

Note: Deleting Movable Type user accounts is not recommended. We would advise disabling an account in favor of deleting it.

AUTHOR & COPYRIGHT

Please see the MT manpage for author, copyright, and license information.

<<