MT::Author - Movable Type author record
use MT::Author;
my $author = MT::Author->new;
$author->name('Foo Bar');
$author->set_password('secret');
$author->save
or die $author->errstr;
my $author = MT::Author->load($author_id);
An MT::Author object represents a user in the Movable Type system. It contains profile information (name, nickname, email address, etc.), global permissions settings (blog creation, activity log viewing), and authentication information (password, public key). It does not contain any per-blog permissions settings--for those, look at the MT::Permission object.
As a subclass of MT::Object, MT::Author inherits all of the data-management and -storage methods from that class; thus you should look at the MT::Object documentation for details about creating a new object, loading an existing object, saving an object, etc.
The following methods are unique to the MT::Author interface:
set_password($pass)One-way encrypts $pass with a randomly-generated salt, using the Unix crypt function, and sets the password data field in the MT::Author object $author.
Because the password is one-way encrypted, there is no way of recovering the initial password.
is_valid_password($check_pass)Tests whether $check_pass is a valid password for the MT::Author object $author (ie, whether it matches the password originally set using set_password). This check is done by one-way encrypting $check_pass, using the same salt used to encrypt the original password, then comparing the two encrypted strings for equality.
The MT::Author object holds the following pieces of data. These fields can be accessed and set using the standard data access methods described in the MT::Object documentation.
<$MTEntryAuthorNickname$> tag.
In addition to numeric ID lookup, you can look up or sort records by any combination of the following fields. See the load documentation in MT::Object for more information.
Please see the MT manpage for author, copyright, and license information.