| AxKit-App-TABOO documentation | view source | Contained in the AxKit-App-TABOO distribution. |
AxKit::App::TABOO::Data::User - User Data objects for TABOO
use AxKit::App::TABOO::Data::User;
$user = AxKit::App::TABOO::Data::User->new(@dbconnectargs);
$user->load(what => '*', limit => {username => 'kjetil'});
my $fullname = $user->load_name('kjetil');
This Data class contains basic user information, such as name, e-mail address, an encrypted password, and so on.
This class implements two methods, the rest is inherited from AxKit::App::TABOO::Data.
new(@dbconnectargs)The constructor. Nothing special.
load_name($username)This is an ad hoc method to retrieve the full name of a user, and it
takes a $username key to identify the user to retrieve. It will
return a string with the full name, but it will also populate the
corresponding data fields of the object. You may therefore call
write_xml on the object afterwards and have markup for the username
and name.
load_passwd($username)This is an ad hoc method to retrieve the encrypted password of a user,
and it takes a $username key to identify the user to retrieve. It
will return a string with the encrypted password, but it will also
populate the corresponding data fields of the object. You may
therefore call write_xml on the object afterwards and have markup
for the username and passwd.
The data is stored in named fields, and for certain uses, it is good to know them. If you want to subclass this class, you might want to use the same names, see the documentation of AxKit::App::TABOO::Data for more about this.
It is natural to subclass this as TABOO grows: One may record more information about contributors to the site, or customers for a webshop. For an example, see AxKit::App::TABOO::Data::User::Contributor
These are the names of the stored data of this class:
A simple word containing a unique name and identifier for the category. Usually known as a username...
The person's full name.
The person's e-mail address.
In the Semantic Web you'd like to identify things and their relationships with URIs. So, we try to record URIs for everybody. For those who have stable home page, it may be convenient to use that URL, but for others, we may just have to come up with something smart.
The user's encrypted password. Allthough it is encrypted, you may not want to throw it around too much. Perhaps it should have been stored somewhere else entirely. YMMV.
The write_xml() method, implemented in the parent class, can be
used to create an XML representation of the data in the object. The
above names will be used as element names. The xmlelement(),
xmlns() and xmlprefix() methods can be used to set the name of
the root element, the namespace URI and namespace prefix
respectively. Usually, it doesn't make sense to change the default
namespace or prefix, that are
userhttp://www.kjetil.kjernsmo.net/software/TABOO/NS/User/OutputuserSee AxKit::App::TABOO.
| AxKit-App-TABOO documentation | view source | Contained in the AxKit-App-TABOO distribution. |