billmax documentation   BillMax Billing Solutions
  877.245.5629
  sales@billmax.com
 

Name

BillMax_UserPut — Insert or update a User record in the user table

Synopsis

#include "billmax.h"

int BillMax_UserPut(user, flags);
USER *user;
int flags;

DESCRIPTION

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.

PARAMETERS

USER *user

The data for inserting or updating a record in user table. See USER structure.

int flags

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

    • if ((flags & FLAGS_NONOTE) == 0 ) - create a Note for this User on a database update or insertion.

    • if ((flags & FLAGS_NONOTE) == 1 ) - do not create a Note for this User on a database update or insertion.

RETURN VALUE

0 for success.

NOTES

NONE

SEE ALSO

NONE


Document Revision A for BillMax 2.2.0   -   Copyright © 1997-2006 The iSpark Group, Inc.

All rights reserved. No part of this documentation may be reproduced or transmitted in any fashion without written permission by The iSpark Group, Inc. This documentation is for the sole use of licensees of the BillMax billing software created by The iSpark Group, Inc. Making the documentation available to a non-licensee of BillMax without written permission of The iSpark Group, Inc. is a violation of the use of this documentation.

While precautions have been taken in the preparation of this documentation, The iSpark Group, Inc. assumes neither liability nor responsibility for errors or omissions, or for damages resulting from the use of the information contained herein.

All terms mentioned that are known to be trademarks have been appropriately capitalized. Use of the a trademark does not affect the validity of any trademark or service mark.

Links to third-party Web sites are provided for convenience. The iSpark Group, Inc. is not responsible for any content contained in the third-party Web sites.

Comments about this documentation may be sent to doc@billmax.com