LedgerSMB::User(3pm)

LedgerSMB::User3pm

Provides user support and database management functions.

Usage

This module provides user support and database management functions.

Status

Deprecated

Methods

LedgerSMB::User->new($login);

Create a LedgerSMB::User object. If the user $login exists, set the fields with values retrieved from the database.

LedgerSMB::User->country_codes();

Returns a hash where the keys are registered locales and the values are the textual representation of the locale name.

LedgerSMB::User->fetch_config($login);

Returns a reference to a hash that contains the user config for the user $login. If that user does not exist, output 'Access denied' if in CGI and die in all cases.

LedgerSMB::User->check_recurring($form);

Disused function to return the number of current recurring events.

LedgerSMB::User::dbconnect_vars($form, $db);

Converts individual $form values into $form->{dboptions} and $form->{dbconnect}.

LedgerSMB::User->dbdrivers();

Returns a list of all drivers set up with DBI whose names end in 'Pg'.

LedgerSMB::User->dbsources($form);

Returns a list of all databases in the same cluster as the database that $form is set to. If $form->{only_acc_db} is set, only non-template databases that have a defaults table owned by $form->{dbuser} are returned.

LedgerSMB::User->dbcreate($form);

Create the database indicated by $form->{db} and load Pg-database.sql, the chart indicated by $form->{chart} and custom tables and functions (Pg-custom_tables.sql and Pg-custom_functions).

LedgerSMB::User->process_query($form, $dbh, $filename);

Load the file $filename into the database indicated through form using psql. $dbh is ignored.

LedgerSMB::User->dbdelete($form);

Disused function to drop the database $form->{db}.

LedgerSMB::User->dbsources_unused($form, $memfile);

Disused function to identify all databases in a cluster with a defaults table that are not mentioned in the memberfile $memfile.

LedgerSMB::User->dbneedsupdate($form);

Disused function to locate all databases owned by $form->{dbuser} that are not a template* database which have a defaults table with a version entry.

LedgerSMB::User->dbupdate($form);

Applies database upgrade scripts to upgrade the database to the current level.

calc_version($version);

Returns a numeric form for the version passed in. The numeric form is derived by converting each dotted portion of the version to a three-digit number and appending them.

 +----------+------------+
 | $version |   returned |
 +----------+------------+
 |   1.0.0  |    1000000 |
 |   1.2.33 |    1002033 |
 | 189.2.33 |  189002033 |
 |  1.2.3.4 | 1002003004 |
 +----------+------------+
script_version

Sorting function for database upgrade scripts.

$user->save_member();

Updates the user config in the database for the user $user. If no config for the user exists, the user to the database.

LedgerSMB::User->delete_login($form);

Disused function to delete the user $form->{login}.

LedgerSMB::User->config_vars();

Disused function that returns a list of user config variable names.

$self->error($msg);

Privately used error function. Used in places where the more typically used $form->error cannot be used. Always dies.

Releases

2 releases since Debian 7 (Wheezy); the text changed 1 time.

  1. 7
  2. 8

From ledgersmb 1.3.40-1 in Debian 8 (Jessie). Parsed by carta from the page's man source.