SYNOPSIS

int MGOwantuwnetid (Uwnetid *uwn, Validation *val, int opts);

DESCRIPTION

The MGOwantuwnetid() function reserves a uwnetid and sets up the appropriate affiliations. A wanted uwnetid will automatically be recycled after a couple of days if not permanently added via MGOadduwnetid(). Validation information is passed through val. The uwnetid and associated information is passed through uwn. The required and optional fields are as follows:

val.validid is the validation id. val.source_code is the validation source reference code. val.lname is the last name. val.pac is the private access code. val.birthdate is the birthdate in YYYY-MM-DD form. 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) 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.

RETURN VALUE

Returns 1 upon success or -1 if an error occurred (in which case MGOerrno and MGOerrmsg are set appropriately).

ERRORS

AUTHENTICATION LEVEL

wmango

SEE ALSO

MGOadduwnetid(), MGOgetvalidations(), MGOselrvalsource(), MGOzero()