|
UserInfoCreateLocalUser Method
|
Creates a new local user if it does not exist already.
Namespace: GSF.IdentityAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.246-beta+ff392465a0262ee2737937d4127fc3c2f08c6dcd
Syntaxpublic static bool CreateLocalUser(
string userName,
string password,
string userDescription = null
)
Public Shared Function CreateLocalUser (
userName As String,
password As String,
Optional userDescription As String = Nothing
) As Boolean
public:
static bool CreateLocalUser(
String^ userName,
String^ password,
String^ userDescription = nullptr
)
static member CreateLocalUser :
userName : string *
password : string *
?userDescription : string
(* Defaults:
let _userDescription = defaultArg userDescription null
*)
-> bool
GSF.Identity.UserInfo.CreateLocalUser = function(userName, password, userDescription);
View SourceParameters
- userName String
- User name to create if it doesn't exist.
- password String
- Password to user for new user.
- userDescription String (Optional)
- Optional user description.
Return Value
Booleantrue if user was created; otherwise,
false if user already existed.
ExceptionsException | Condition |
---|
ArgumentNullException | userName or password was null. |
ArgumentException | No userName was specified. |
InvalidOperationException | Could not create local user. |
See Also