Apple AppleShare 3.0 Users and Groups Programming Interface User Manual
Page 9

UGNewUser creates a new user. The pointer ugNamePtr (a pointer to a Str31)
contains the name of the user and the pointer ugPassword (a pointer to a
Str8) contains the password. The new user is created with the characteristics
passed in ugUserFlags (a long; see "Data Structures," later in this document,
for details). To create the administrator user, set ugUserID to 1. To create
a regular user, set ugUserID to 0. The user ID of the user created is passed
back in ugUserID.
Result Codes
noErr 0 No error.
ugUserAlreadyExists 1 User with the same name exists or an
attempt was made to create the
administrator user and the
administrator user already exists.
ugGroupAlreadyExists 2 Group with the same name exists.
ugNoMoreUGs 4 The maximum value ($FFFFFFFF) has been
reached.
ugBadParamErr 13 async is TRUE, the length of the user
name is less than 1 or greater than 31,
the user name contains a colon, the
length of the user password is greater
than 8, or ugUserID is not 0 or 1.
ugServerRunning 16 Server is running.
ugAdminRunning 17 Admin is running.
ugNotBtree 18 Users and groups file is not a B-Tree
file.
ugDskFull 20 No space on disk.
ugBadUID 21 ugAccessID is wrong. The users and
groups file may not be open.
ugFatalError 99 There is a problem with the users and
groups file. Delete it and re-create
it.
UGDeleteUser
FUNCTION UGDeleteUser (thePB: UserGroupPBPtr; async: BOOLEAN): OSErr;
pascal OSErr UGDeleteUser (UserGroupPBPtr thePB, Boolean async);
Parameter Block 24 ugRefNum word file reference
number
30 ugAccessID long program access ID
34 ugUserID long user ID
UGDeleteUser deletes the user specified by ugUserID. The administrator user