home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR21
/
DOUGM.ZIP
/
DM168SRC.ZIP
/
NOVELL.C
< prev
next >
Wrap
Text File
|
1992-07-30
|
1KB
|
44 lines
char* UserName (void)
{
WORD connectionNumber;
char userName[48];
WORD objectType;
long objectID;
BYTE loginTime[7];
int ccode;
connectionNumber = GetConnectionNumber();
ccode = GetConnectionInformation( connectionNumber,
userName,
&objectType,
&objectID,
loginTime );
return (userName);
};
boolean IsMember (char *group)
{
char objectName[48];
char propertyName[16];
char memberName[48];
WORD objectType, memberType;
/* if this is not done, the following will return false values
if the netware shell is not loaded */
if( !GetConnectionNumber() )
return(NO);
strcpy (objectName, UserName ());
objectType = OT_USER;
strcpy (propertyName, "GROUPS_I'M_IN");
strcpy (memberName, group);
memberType = OT_USER_GROUP;
if ( IsBinderyObjectInSet (objectName, objectType, propertyName,
memberName, memberType) )
return (NO);
else
return (YES);
};