beautypg.com

Apple AppleShare 3.0 Users and Groups Programming Interface User Manual

Page 13

background image

ugUserNotFound 5 The user is not in the users and groups

file.

ugGroupNotFound 6 The group is not in the users and groups

file.

ugNotAUser 7 ugUserID is not the ID of a user.

ugNotAGroup 8 ugGroupID is not the ID of a group.

ugNotaMember 10 User is not a member of the group specified

by ugGroupID.

ugNoMoreUsers 11 There are no more users in the users and

groups file, or there are no more users in

the group.

ugBadParamErr 13 async is TRUE, the length of the user name

is greater than 31, or ugPosOffset is not 0

or 1.

ugEOF 23 End of file.

ugFatalError 99 There is a problem with the users and

groups file. Delete it and re-create it.

UGSetUserInfo

FUNCTION UGSetUserInfo (thePB: UserGroupPBPtr; async: BOOLEAN): OSErr;

pascal OSErr UGSetUserInfo (UserGroupPBPtr thePB, Boolean async);

Parameter Block 18 ugNamePtr long pointer to user name

24 ugRefNum word file reference number

30 ugAccessID long program access ID

34 ugUserID long user ID

48 ugChngFlags word change flag codes

50 ugPassword long pointer to user

password

54 ugUserFlags long user flags

UGSetUserInfo can be used to set ugPassword (a pointer to a Str8), the user's

password, and the user flags specified by ugUserFlags. (Refer to "Data

Structures," later in this document, for details.) The user is specified

either by ugUserID or

by ugNamePtr (a pointer to a Str31). If ugUserID is used, then ugNamePtr

should be a pointer to a zero-length Str31. If ugNamePtr is used, then

ugUserID should be 0. If both fields have values, then ugUserID takes

precedence. ugChngFlags should be set to ChngUserPasswd (1) if the password

is to be changed,to ChngUserFlags (2) if the user's flags are to be changed,

and to ChngUAll (3) if both are to be changed.