![]() |
BillMax Billing Solutions 877.245.5629 sales@billmax.com |
BillMax_UserPut — Insert or update a User record in the user table
#include "billmax.h"
int BillMax_UserPut(user, flags);USER *user;int flags;
If user->number is 0, then a new record is inserted into the note table. If note->number is NOT 0 and there exists a record in the note table of which note.number is the same value as note->number, then the database fields of that record are updated with the values in USER structure. Otherwise a new record is inserted with the values in NOTE structure.
The data for inserting or updating a record in user table. See USER structure.
flags is used when updating an existing User. The following values OR'd together are recognized:
FLAGS_FORCE - Used when the new State is Open State.
if ((flags & FLAGS_FORCE) == 0 ) - change user->state from STATE_SUSPENDED to STATE_OPEN if applicable.
if ((flags & FLAGS_FORCE) == 1 ) - change user->state to STATE_OPEN regardless of current value of user->state.
This behavior cascades down to the Service's that belong to the user.
FLAGS_NONOTE