The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

AxKit::App::TABOO::Data::User - User Data objects for TABOO

SYNOPSIS

  use AxKit::App::TABOO::Data::User;
  $user = AxKit::App::TABOO::Data::User->new();
  $user->load('kjetil');
  my $fullname = $user->load_name('kjetil');

DESCRIPTION

This Data class contains basic user information, such as name, e-mail address, an encrypted password, and so on.

METHODS

This class implements two methods, the rest is inherited from AxKit::App::TABOO::Data.

new()

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.

STORED DATA

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.

This class is quite certain to be subclassed at some point as TABOO grows: One may record more information about contributors to the site, or customers for a webshop.

These are the names of the stored data of this class:

  • username

    A simple word containing a unique name and identifier for the category. Usually known as a username...

  • name

    The person's full name.

  • email

    The person's e-mail address.

  • uri

    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.

  • passwd

    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.

FORMALITIES

See AxKit::App::TABOO.