Creates new panel user

@param panel panel
@param user user
@param role user's role in panel
@param joinType join type
@param stamp panel stamp
@param creator creator user
@return new panelist
176256
public PanelUser create(Panel panel, User user, PanelUserRole role, PanelUserJoinType joinType, PanelStamp stamp, User creator) {
    Date now = new Date();
    
    PanelUser panelUser = new PanelUser();
    panelUser.setPanel(panel);
    panelUser.setUser(user);
    panelUser.setRole(role);
    panelUser.setJoinType(joinType);
    panelUser.setStamp(stamp);
    panelUser.setCreated(now);
    panelUser.setCreator(creator);
    panelUser.setLastModified(now);
    panelUser.setLastModifier(creator);
    panelUser.setArchived(Boolean.FALSE);
    
    return persist(panelUser);
  }
1150908
public Principal pushRole(Principal user, String role)
    {
        if (user==null)
            user=new User();
        
        return new WrappedUser(user,role);
    }
1084968
public void addAuthor(String author) {
		XmpArray array = new XmpArray(XmpArray.ORDERED);
		array.add(author);
		setProperty(CREATOR, array);
	}
140269
public QYResultType create(QYUser user){
        BeanUtil.requireNonNull(user, "user is null");
        String url = BASE_API_URL + "cgi-bin/user/create?access_token=#";
        BaseResponse response = executePost(url, user.toJsonString());
        return QYResultType.get(response.getErrcode());
    }
889545
@com.fasterxml.jackson.annotation.JsonProperty("CreatorRequestId")
    public void setCreatorRequestId(String creatorRequestId) {
        this.creatorRequestId = creatorRequestId;
    }
20267
public BoxGroupMembership.Info addMembership(BoxUser user, Role role) {
        BoxAPIConnection api = this.getAPI();

        JsonObject requestJSON = new JsonObject();
        requestJSON.add("user", new JsonObject().add("id", user.getID()));
        requestJSON.add("group", new JsonObject().add("id", this.getID()));
        if (role != null) {
            requestJSON.add("role", role.toJSONString());
        }

        URL url = ADD_MEMBERSHIP_URL_TEMPLATE.build(api.getBaseURL());
        BoxJSONRequest request = new BoxJSONRequest(api, url, "POST");
        request.setBody(requestJSON.toString());
        BoxJSONResponse response = (BoxJSONResponse) request.send();
        JsonObject responseJSON = JsonObject.readFrom(response.getJSON());

        BoxGroupMembership membership = new BoxGroupMembership(api, responseJSON.get("id").asString());
        return membership.new Info(responseJSON);
    }
715598
public ComponentDto create(DbSession dbSession, NewComponent newComponent, @Nullable Integer userId) {
    ComponentDto componentDto = createWithoutCommit(dbSession, newComponent, userId);
    commitAndIndex(dbSession, componentDto);
    return componentDto;
  }
590528
@Override
	public CommerceAccountUserRel create(
		CommerceAccountUserRelPK commerceAccountUserRelPK) {
		CommerceAccountUserRel commerceAccountUserRel = new CommerceAccountUserRelImpl();

		commerceAccountUserRel.setNew(true);
		commerceAccountUserRel.setPrimaryKey(commerceAccountUserRelPK);

		commerceAccountUserRel.setCompanyId(companyProvider.getCompanyId());

		return commerceAccountUserRel;
	}
679285
public SipURI createSipURI(String user, String host) {
		return sipFactoryImpl.createSipURI(user, host);
	}
1067373
public Response create(String username, String password, String organization, String email, String phone, String countryCode, String firstName, String lastName) {
        Response op = new Response();
        if (userDAO.hasUser(username) == false) {
            if (userDAO.hasUserWithEmail(email) == false) {
                if (organizationDAO.hasOrganization(organization) == true) {
                    PersistedUser user = new PersistedUser(username, null, Arrays.asList("ROLE_USER"), organization, email, phone, countryCode);
                    user.firstName = firstName;
                    user.lastName = lastName;
                    user.has2FAEnabled = Boolean.parseBoolean(authyEnabled);
                    createPasswordHash(user, password);
                    com.authy.api.User authyUser = client.getUsers().createUser(user.email, user.phone, user.countryCode);
                    user.authProviderId = authyUser.getId();
                    userDAO.create(user);
                    op.setPayload(true);
                    sendAccountVerificationMessage(user, null);
                    notifyOperator(user);
                } else {
                    op.addError(new Error(11));
                }
            } else {
                op.addError(new Error(Error.USER_BY_EMAIL_FOUND));
            }
        } else {
            op.addError(new Error(7));
        }
        return op;
    }
382686
public void map(final RestletUtilUser user, final Role role)
    {
        try
        {
            this.addRoleMapping(new RoleMapping(user, role));
        }
        catch(final RepositoryException e)
        {
            throw new RuntimeException("Found unexpected exception while adding role mapping", e);
        }
    }
973319
@SneakyThrows
    protected boolean createUserResource(final Principal p, final Credential credential) {
        val user = new UserResource();
        this.mapper.map(user, p, credential);
        return scimService.create("Users", user) != null;
    }
906724
def create(config, name, group, type):
        """"""
        if type not in ('user', 'service'):
            raise click.BadOptionUsage("--type must be 'user' or 'service'")
        client = Client()
        client.prepare_connection()
        user_api = API(client)
        group_api = GroupApi(client)
        user_api.create(name[0], name[1], group, type, group_api)
211441
def creator_type(self, creator_type):
        
        allowed_values = ["USER", "ALERT", "SYSTEM"]  # noqa: E501
        if not set(creator_type).issubset(set(allowed_values)):
            raise ValueError(
                "Invalid values for `creator_type` [{0}], must be a subset of [{1}]"  # noqa: E501
                .format(", ".join(map(str, set(creator_type) - set(allowed_values))),  # noqa: E501
                        ", ".join(map(str, allowed_values)))
            )

        self._creator_type = creator_type
1306709
@Beta
  public GoogleCredential createDelegated(String user) {
    if (serviceAccountPrivateKey == null) {
      return this;
    }
    return toBuilder()
        .setServiceAccountUser(user)
        .build();
  }
962730
def create_user(self, **kwargs):
        """"""
        roles = kwargs.pop('roles', [])
        user = self.user_model(**self._prepare_create_user_args(**kwargs))
        user = self.put(user)
        for role in roles:
            self.add_role_to_user(user, role)
        self.put(user)
        return user
121320
public static PrincipalResolver newPersonDirectoryPrincipalResolver(
        final PrincipalFactory principalFactory, final IPersonAttributeDao attributeRepository,
        final PersonDirectoryPrincipalResolverProperties personDirectory) {

        return new PersonDirectoryPrincipalResolver(
            attributeRepository,
            principalFactory,
            personDirectory.isReturnNull(),
            personDirectory.getPrincipalAttribute(),
            personDirectory.isUseExistingPrincipalId(),
            personDirectory.isAttributeResolutionEnabled(),
            org.springframework.util.StringUtils.commaDelimitedListToSet(personDirectory.getActiveAttributeRepositoryIds())
        );
    }