Click or drag to resize

UserInfoCreateLocalUser Method

Creates a new local user if it does not exist already.

Namespace: GSF.Identity
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.286-beta+af3877f0fd6bd9f0ab0bb09de528343468ffe7d4
Syntax
public static bool CreateLocalUser(
	string userName,
	string password,
	string userDescription = null
)
View Source

Parameters

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

Boolean
true if user was created; otherwise, false if user already existed.
Exceptions
ExceptionCondition
ArgumentNullExceptionuserName or password was null.
ArgumentExceptionNo userName was specified.
InvalidOperationExceptionCould not create local user.
See Also