Introduction
Server Platform
Application Server
Content Generation
Class Library API
   Runtime System
   WebServer
   Process
   Database
   Page
   Context
   Elements
   Templates
   Menu
   User
   CGI
   Form
   Table
   TreeAdmin
   DirectoryTree
   Application
Manual Index

next | previous

Maxscape::UserData Package

Member Functions

  1. accessableWebServer
  2. addCGI_Property
  3. addUserProfileProperty
  4. Balance
  5. CGI_Property
  6. CGI_Variable
  7. CGI_VariableNames
  8. changeCGI_Property
  9. changeProperty
  10. changeUserChannels
  11. changeUserData
  12. changeUserProfile
  13. changeUserProperty
  14. changeWebServer
  15. chooseUserGroup
  16. deleteCGI_PropertyType
  17. deleteUserProfileProperty
  18. deleteUserProfileRecord
  19. displayUserChannels
  20. displayUserData
  21. displayUserProfile
  22. Error
  23. execFormInContext
  24. getUserData
  25. getUserPropertyFromDB
  26. GroupId
  27. GroupPermission
  28. importUserProfile
  29. insertProperty
  30. IsInUserGroups
  31. isPublic
  32. logRequest
  33. lookupProperties
  34. MemberDataTable
  35. MemberDataTableFieldCallback
  36. new
  37. NrOfUserGroups
  38. PageGroupId
  39. printError
  40. promptUserData
  41. Property
  42. queryUserData
  43. queryUserId
  44. Scores
  45. ScoresAndBalances
  46. selectProfileGroupWidget
  47. selectUserChannels
  48. showUsers
  49. ToggleHyperlink
  50. ToggleSubmitButton
  51. uploadFileLimit
  52. USER_TYPE
  53. UserGroups
  54. UserHomeCategory
  55. UserHomeCategoryPath
  56. UserHomeDirectory
  57. UserHomePagePath
  58. UserHomeRootCategory
  59. UserId
  60. UserIdFirstChar
  61. UserIdFirstCharacter
  62. UserIdFirstUpperChar
  63. UserImageDirectory
  64. UserIsOnline
  65. UserLoggedIn
  66. UserLoginRequest
  67. UserLogoutRequest
  68. UserPictureFilePath
  69. UserPicturePath
  70. UserScoreType
  71. UserType
  72. UserTypeAccountSettings

Synopsis

use Maxscape::UserData;

Description

The user data class provides an API to the servers basic personalization features. If authentification is enabled, an object of this class is created by the servers runtime system.

Within the context of a page the Maxscape::UserData object is a member of the Page object. To access the object use: $Page->{User} or $Page->User.

new

Synopsis

my $User = Maxscape::UserData->new ();

Description

Creates an object instance of the Maxscape::UserData class.

Examples

use Maxscape::Database;

my $User = Maxscape::UserData->new (DB => $::DB);

lookupProperties

Synopsis

$User->lookupProperties();

Description

Lookup into the USER_PROFILE table, to fetch the user's properties.

Within the servers runtime system this function is called by default, if the authentication system is enabled and the variable $::WebServer->{lookupUserProfile} is set.

Property

Synopsis

my $Property = $User->Property ('PropertyName', [ 'PropertyValue' ] );

Description

Returns or sets the user's properties, if defined.

getUserPropertyFromDB

Synopsis

my $PropertyValue = $User->getUserPropertyFromDB ($UserId, $PropertyName);

Description

changeProperty

Synopsis

my $ErrorText = $User->changeProperty('foo', 'bar', $forceChange);

Description

Changes the users property 'foo' to 'bar' persistantly. The variable $forceChange is optional.

changeUserProperty

Synopsis

my $ErrorText = $User->changeUserProperty ($UserId, 'foo', 'bar', $forceChange);

Description

Changes the users property 'foo' to 'bar' persistantly. The variable $forceChange is optional.

insertProperty

Synopsis

my $ErrorText = $User->insertProperty ('foo', 'bar');

Description

Inserts the users property 'foo' to the user's properties.

CGI_Property

Synopsis

my $CGI_Property = $User->CGI_Property ('Advertise','Countries');

Description

Returns the user's CGI property, if defined.

Examples

my $ProfileHelpFrameView = $Page->{User}->CGI_Property ('SiteView','ProfileHelpFrameView');

unless ($ProfileHelpFrameView) {
  my $Error = $Page->{User}->addCGI_Property ('SiteView','ProfileHelpFrameView', 'HelpHTML', 10);
  $ProfileHelpFrameView = $Page->{User}->CGI_Property ('SiteView','ProfileHelpFrameView');
}

addCGI_Property

Synopsis

my $ErrorText = $User->addCGI_Property ('Advertise','Countries', $Value, 6);

Description

Adds a property to the user's CGI properties. An entry in the USER_PROFILE table is of the form: SiteView:ProfileHelpFrameView=HelpHTML,TableView=Style1;

changeCGI_Property

Synopsis

my $CGI_Property = $User->changeCGI_Property ('Advertise','Countries', $Value);

Description

Returns the user's CGI property, if defined.

deleteCGI_PropertyType

Synopsis

my $CGI_Property = $User->deleteCGI_PropertyType ('Advertise');

Description

CGI_VariableNames

Synopsis

@CGI_VariableNames = $User->CGI_VariableNames ('CGI_FormVariables');

Description

Returns the names of CGI properies variables.

CGI_Variable

Synopsis

my $Value = $Page->User->CGI_Variable ( %P );

Description

Gets and sets (if required) a CGI variable. Bugs: Don't use the integer 0 as Value.

Examples

$Value = $Page->User->CGI_Variable (Type    => 'Advertise',
                                    Name    => 'Countries',
                                    Value   => $Page->{CGI}->{Countries},
                                    Default => 'Worldwide',
);

ToggleSubmitButton

Synopsis

$ToggleValue = $Page->User->ToggleSubmitButton ( %P );

Description

Toggles a value, stored in the user's profile.

Examples




ToggleHyperlink

Synopsis

$ToggleLink = $Page->User->ToggleHyperlink ( %P );

Description

Toggles an hyperlink, storing the (CGI) values in the user's profile.

Examples

$Hyperlink = $User->ToggleHyperlink (
  Page                     => $Page,
  CGI_VariableName         => 'showPageHead',
  CGI_VariableDefaultValue => 'yes', # yes, no
  Type                     => 'PageLayout',
  Category                 => $CategoryName,
  Page                     => $PageName,
  CSS_Style                => '',
  CSS_Class                => 'Menu',
);

$MenuLinks = $Page->{User}->ToggleHyperlink (
  Page                     => $Page,
  CGI_VariableName         => 'showPageHead',
  CGI_VariableDefaultValue => 'yes',     # yes, no
  Type                     => 'PageLayout',
  #CategoryName             => $Category,
  PageName                 => 'Index',
  CSS_Style                => 'font-size:0.9em; padding-right:5px;',
  #StatusLine               => 'StatusLine',
  de                       => { no => 'Kein Seitenkopf', yes => 'Seitenkopf' },
  en                       => { no => 'No page header', yes => 'Page header' },
);

USER_TYPE

Synopsis

my $USER_TYPE = $User->USER_TYPE(); # e.g. free, friend, super

Description

Depriciated.

UserType

Synopsis

$UserType = $User->UserType();

Description

Returns the user type from the users PROFILE table 'USER_TYPE' property.

UserScoreType

Synopsis

my ($UserType, $UserBalance, $UserScores) = $User->UserScoreType;

Description

Balance

Synopsis

$User->Balance(action => 'add', value =>10);

Description

Scores

Synopsis

$User->Scores();

Description

ScoresAndBalances

Synopsis

$User->ScoresAndBalances();

Description

UserId

Synopsis

my $UserId = $User->UserId();

Description

Examples

Returns the user's user identification (USER_ID).

UserTypeAccountSettings

Synopsis

my $UserTypeAccountSettings = $User->UserTypeAccountSettings (%P);

Description

Returns the user's upload file limit in bytes or kbytes.

Examples

my $UserTypeSettings = $Page->User->UserTypeSettings ();

uploadFileLimit

Synopsis

my $uploadFileLimit = $User->uploadFileLimit (%P);

Description

Returns the user's upload file limit in bytes or kbytes.

my $uploadFileLimit = $Page->User->uploadFileLimit (PagePath => '/Path', Magnitude => 'kbytes');

UserImageDirectory

Synopsis

my $UserImageDirectory = $Page->{User}->UserImageDirectory ( UserId => 'UserId' );

Description

UserPicturePath

Synopsis

my $PictureName = $Page->{User}->UserPicturePath ( UserId => 'UserId', Type => $ProfileType );

Description

UserPictureFilePath

Synopsis

my $UserPictureFilePath = $Page->{User}->UserPictureFilePath ( UserId => $UserId, Type => $ProfileType );

Description

UserHomeRootCategory

Synopsis

my $UserHomeRootCategory = $User->UserHomeRootCategory;
my $UserHomeRootCategory = $User->UserHomeRootCategory ($UserId);

Description

Returns the category where a user's website is located (e.g. /User/Home/M).

UserHomeCategory

Synopsis

my $UserHomeCategory = $Page->{User}->UserHomeCategory;

Description

Returns the user's user identification (USER_ID).

UserIdFirstUpperChar

Synopsis

my $firstUpperChar = $User->UserIdFirstUpperChar;
my $firstUpperChar = $User->UserIdFirstUpperChar ($UserId);

Description

Returns the first character of the given 'UserId' as a capital character.

UserIdFirstChar

Synopsis

my $firstChar = $User->UserIdFirstChar;
my $firstChar = $User->UserIdFirstChar ($UserId);

Description

Returns the first character of the given 'UserId'.

UserIdFirstCharacter

Synopsis

my $UserIdFirstChar = $User->UserIdFirstCharacter();
my $UserIdFirstChar = $User->UserIdFirstCharacter("Max");

Description

Returns the user's user identification first character.

UserHomePagePath

Synopsis

$UserHomePagePath = $User->UserHomePagePath();

Description

Return the user's home page path.

Examples

my $UserHomePagePath = $User->UserHomePagePath();
# e.g. $UserHomePagePath = 'Category=/User/Home/M/&Page=Maxscape': 

UserHomeCategoryPath

Synopsis

my $UserHomeCategoryPath = $Page->UserHomeCategoryPath();

Description

Return the user's home category.

Examples

my $UserHomeCategoryPath = $User->UserHomeCategoryPath();
# e.g. $UserHomeCategoryPath = 'Category=/User/Home/M/Maxscape': 

UserHomeDirectory

Synopsis

$UserHomeDirectory = $User->UserHomeDirectory;

Description

Return the user's home directory.

Examples

$UserHomeDirectory = $User->UserHomeDirectory;
# e.g. $UserHomeDirectory = '/Home/M/Maxscape'

queryUserId

Synopsis

my $UserId = $User->queryUserId ('Max');

Description

Queries the database for a UserId.

queryUserData

Synopsis

my $Data = $User->queryUserData ('Max');

Description

Queries the database for the data associated with the use.

Examples

my $Data = $User->queryUserData ('Max', "USER_ID, USER_TYPE, EMAIL");
return ${$Data}{H_USER_ID};

isPublic

Synopsis

my $UserIsPublic = $User->isPublic;

Description

Tells if it is a public user.

UserLoggedIn

Synopsis

$User->UserLoggedIn();

Description

Tells if the user is logged onto this server

PageGroupId

Synopsis

$User->PageGroupId;
$User->PageGroupId ($WebServerName);

Description

Returns the user's group identification.

GroupId

Synopsis

$User->GroupId();

Description

Returns the user's group identification.

GroupPermission

Synopsis

$User->GroupPermission();

Description

Returns the user's group permission (r=read; w=write; x=execute).

selectProfileGroupWidget

Synopsis

my $selectedProfileGroup = $User->selectProfileGroupWidget ();

Description

Return the user's profile group from the USER_PROFILE 'USER_GROUPS' property as a select widget.

UserGroups

Synopsis

my $UserGroups = $User->UserGroups;
my $User->UserGroups ('AsString');
my $User->UserGroups ('PersonalUserGroups,CommonUserGroups,ClosedUserGroups');
my $User->UserGroups ('PersonalUserGroups,-ClosedUserGroups');

Description

Return the user's group from the USER_PROFILE 'USER_GROUPS' property.

IsInUserGroups

Synopsis

my $isInGroup = $User->IsInUserGroups('Users,Resume');

Description

NrOfUserGroups

Synopsis

my $NrOfUserGroups = $User->NrOfUserGroups();

Description

chooseUserGroup

Synopsis

my $Group = $User->chooseUserGroup ();

Description

Chooses a user group.

Examples

my $Group = $User->chooseUserGroup ('withDot');

accessableWebServer

Synopsis

my $Permission = $User->accessableWebServer;

Description

importUserProfile

Synopsis

$User->importUserProfile();

Description

Imports a user profile.

printError

Synopsis

$User->printError;

Description

Return the last error message.

Error

Synopsis

$User->Error($ErrorMessage);

Description

Sets an error message.

getUserData

Synopsis

$User->getUserData ($Page);

Description

Fetches the user's data from the database and writes the data to the pages $Page->{User}->{Data} hash member.

changeUserData

Synopsis

$User->changeUserData ($Page);

Description

Changes the user's data.

execFormInContext

Synopsis

$User->execFormInContext;

Description

Returns some necessary hidden form elements.

promptUserData

Synopsis

my $FormText = $User->promptUserData ($Page);

Description

Prompt users data for user input.

displayUserData

Synopsis

my $DataText = $User->displayUserData ($Page);

Description

Displays and changes a users data.

showUsers

Synopsis

my $showUsersText = $UserData->showUsers ($Page);

Description

Displays users.

displayUserProfile

Synopsis

my $ProfileText = $User->displayUserProfile ($Page);

Description

Displays a user's profile.

addUserProfileProperty

Synopsis

my $Text = $User->addUserProfileProperty();

Description

Adds a user property.

changeUserProfile

Synopsis

my $Text = $User->changeUserProfile ($Page);

Description

Changes and displays a user's profile properties.

deleteUserProfileRecord

Synopsis

my $Text = $User->deleteUserProfileRecord ($Page);

Description

Deletes user profile properties.

deleteUserProfileProperty

Synopsis

$User->deleteUserProfileProperty();

Description

changeWebServer

Synopsis

my $ErrorText = $User->changeWebServer ($WebServerName, $DatabaseName);

Description

Changes to the Content Database of an application server.

UserLoginRequest

Synopsis

my ($lastLoginTime, $LoginTime) = $Page->User->UserLoginRequest ($Page);

Description

Logs a user's login request.

UserLogoutRequest

Synopsis

my ($lastLoginTime, $LogoutTime) = $Page->User->UserLogoutRequest ($Page);

Description

Logs a user's logout request.

UserIsOnline

Synopsis

my $IsOnlie = $Page->User->UserIsOnline;

Description

Tells if a user is online.

logRequest

Synopsis

$Page->User->logRequest;

Description

Logs a user's request.

selectUserChannels

Synopsis

$Page->User->selectUserChannels ($Page);

Description

Selects a user channel.

changeUserChannels

Synopsis

$Page->User->changeUserChannels ($Page);

Description

Changes a user's channel.

displayUserChannels

Synopsis

$Page->User->displayUserChannels($Page);

Description

Displayes a user's channel.

MemberDataTable

Synopsis

my $MemberDataTable = $User->MemberDataTable ($Page, $p);

Description

Displays a user's data as an HTML table.

MemberDataTableFieldCallback

Synopsis

my $MemberDataTableFieldCallback = $User->MemberDataTableFieldCallback ();

Description

Displays a database field.


nextprevioustopbecome a membercontact © Maxscape