Search the Community
Showing results for tags '_ad_createuser'.
Found 1 result
I have a question about the @error logging features in _AD_CreateUser. Hopefully I am just missing something obvious. In my app I am creating a user if it does not exist then manipulating some attributes. If the user does exist I would then call another function to remove groups from the user and modify some attributes. My question is... If the user already Exists, the _AD_CreateUser option gives $iValue = 0 and @error = 0. How can @error = 1 for the condition that the user already exists? I copied a small ship of the code in question along with my full .au3. I am using AD UDF 18.104.22.168 (Water, thanks for the awesome work on this!!!). $iValue = _AD_CreateUser ($sOU, $sUser, $sCN) If $iValue = 1 Then _FileWriteLog ($Log, "Func UserCheck() - User '" & $sUser & "' successfully created ==> Calling UserAttribsNewUser Function.") Call ("NewUser") ElseIf @error = 1 Then _FileWriteLog ($Log, $sUser & " already exists ==> Calling UserAttribsExistingUser Function.") Call ("ExistingUser") AccountSettingConfigurations-Test1.au3