Rock.Model.UserLoginService.Create C# (CSharp) Method

Create() public static method

Creates a new Rock.Model.UserLogin
Thrown when the Username already exists. Thrown when the service does not exist or is not active.
public static Create ( RockContext rockContext, Rock person, AuthenticationServiceType serviceType, int entityTypeId, string username, string password, bool isConfirmed ) : UserLogin
rockContext RockContext The rock context.
person Rock The that this will be associated with.
serviceType AuthenticationServiceType The type of Login
entityTypeId int The entity type identifier.
username string A containing the UserName.
password string A containing the unhashed/unencrypted password.
isConfirmed bool A flag indicating if the user has been confirmed.
return UserLogin
        public static UserLogin Create( RockContext rockContext,
            Rock.Model.Person person,
            AuthenticationServiceType serviceType,
            int entityTypeId,
            string username,
            string password,
            bool isConfirmed )
        {
            return UserLoginService.Create( rockContext, person, serviceType, entityTypeId, username, password, isConfirmed, false );
        }

Same methods

UserLoginService::Create ( RockContext rockContext, Rock person, AuthenticationServiceType serviceType, int entityTypeId, string username, string password, bool isConfirmed, bool isRequirePasswordChange ) : UserLogin

Usage Example

コード例 #1
0
ファイル: NewAccount.ascx.cs プロジェクト: shelsonjava/Rock
        private Rock.Model.UserLogin CreateUser(Person person, bool confirmed)
        {
            var userLoginService = new Rock.Model.UserLoginService();

            return(userLoginService.Create(person, Rock.Model.AuthenticationServiceType.Internal,
                                           EntityTypeCache.Read(Rock.SystemGuid.EntityType.AUTHENTICATION_DATABASE.AsGuid()).Id,
                                           tbUserName.Text, Password, confirmed, CurrentPersonId));
        }
All Usage Examples Of Rock.Model.UserLoginService::Create