int MGOadduwnetid (Uwnetid *uwn, Validation *val, int opts);
The MGOadduwnetid() function adds a uwnetid and sets up the appropriate affiliations. Validation information is passed through val. The uwnetid and associated information is passed through uwn. The required and optional fields are (the values in brackets indicate which validation tables the field is defined for):
val.validid is the validation id. val.ein is the employee number. val.ssn is the social security number. val.studentid is the student number. val.account is the AVF account name. val.system_key is the student system key value. val.clinicianid is the clinician id. val.advanceid is the advance id. val.regid is the registry id. You must specify one (or more) of: validid, ein, ssn, studentid, account, system_key, clinicianid, advanceid, regid. val.lname is the last name. val.pac is the private access code. If specified and the pac is marked as one-time, the pac will expire automatically in two hours. val.birthdate is the birthdate in YYYY-MM-DD form. val.source_code is the validation source reference code. uwn.uwnetid is the uwnetid name. If a "*" is placed at the end of the name, a unique uwnetid consisting of the name (plus the next number in sequence beginning with 1 if the name is already taken) will be generated. If a high uid is wanted, then the uwn.uid field should be set. Specify a positive value, or 0 to have one chosen at random. The same applies for a low uid (uwn.luid). uwn.account is the account name. It typically is set to the encrypted employee number, student number, or some other unique value. opts can be one or more of:
Note: Upon successful return, the uwn.uwnetid and uwn.uid fields will be set their resultant values.
Returns 1 upon success or -1 if an error occurred (in which case MGOerrno and MGOerrmsg are set appropriately).
wmango
MGOgetvalidations(), MGOselrvalsource(), MGOwantuwnetid(), MGOzero()