Suggest a unique nick name for a given e-mail
If a user with given e-mail already exists at k_users table,
then the nick name of that user is returned,
else a new nick name unique for that e-mail is suggested

store

If gu_user is not set then a new GUID is assigned.
If dt_last_update is not set then current system date is assigned.
If len_quota is not set then zero is assigned.
If max_quota is not set then 100Mb assigned.
Syntax for tx_main_email and tx_alt_email is verified if these fields are not null

getMailRoot

The user mail root category is always named DOMAIN_nickname_mail
at nm_category field of k_categories.
If there is no category named DOMAIN_nickname_mail but the
user has his gu_category field set at k_users table then this method tries
to create a new mail root category.

Parameters:

oConn - Database Connection

Returns:

a gu_category value from k_categories or null if this user
does not have a mail root category and a new one could not be created

Throws:

java.sql.SQLException

getMailFolder

The Inbox category is where messages downloaded from the mail server are cached by default.
The user mail inbox category is always named DOMAIN_nickname_inbox at nm_category field of k_categories.
If there is no category named DOMAIN_nickname_inbox but the
user has a mail root category then this method tries to create a new mail
inbox category under mail root.

Parameters:

oConn - Database Connection

sFolderName - One of { "inbox", "drafts", "deleted", "sent", "spam" }

Returns:

a gu_category value from k_categories or null if this user
does not have a mail inbox category and a new one could not be created

Throws:

java.sql.SQLException

java.lang.NullPointerException - if sFolderName is null or empty string

Values - User fields, all required, must be in this order { (Integer)id_domain, (String)tx_nickname, (String)tx_pwd, (Short)bo_active, (Short)bo_searchable, (Short)bo_change_pwd, (String)tx_main_email, (String)tx_alt_email, (String)nm_user, (String)tx_surname1, (String)tx_surname2, (String)tx_challenge, (String)tx_reply, (String)nm_company, (String)de_title, (String)gu_workarea, (String)tx_comments, (Date)dt_pwd_expires }
Values up to and including tx_surname1 must be NOT NULL, values from tx_surname2 are required but may be null.

Returns:

New User Unique Identifier

Throws:

java.sql.SQLException - If another user with the same GUID already exists

Values - User fields, all required, must be in this order { (Integer)id_domain, (String)tx_nickname, (String)tx_pwd, (Short)bo_active, (Short)bo_searchable, (Short)bo_change_pwd, (String)tx_main_email, (String)tx_alt_email, (String)nm_user, (String)tx_surname1, (String)tx_surname2, (String)tx_challenge, (String)tx_reply, (String)nm_company, (String)de_title, (String)gu_workarea, (String)tx_comments, (Date)dt_pwd_expires }
Values up to and including tx_surname1 must be NOT NULL, values from tx_surname2 are required but may be null.