Security Manager Return Codes
The account manipulation methods all provide a return code that is one of the #SMAPIErr values defined in the imported API:
Constant #SMAPIErrSuccess = 0 { Successful result };
Constant #SMAPIErrNoUser = 1 { User doesn't exist };
Constant #SMAPIErrNeedManager = 2 { Caller did not have Manager privilege };
Constant #SMAPIErrUserExists = 3 { User already exists - can't add again };
Constant #SMAPIErrBadParm = 4 { Bad parameter };
Constant #SMAPIErrNotEditable = 5 { The application is not editable };
Constant #SMAPIErrPwdTooWeak = 6 { Password is too weak };
Note that GetAccountInfo (described in the Query Module Calls) is useful in obtaining account information in the same format as is required by ModifyAccount and DeleteAccount. The error code can be converted to text e.g. for error display purposes by calling UIErrorToText().