Add a user account from the properties provided.

@param user a UaaUser
339106
protected void addUser(UaaUser user) {
        ScimUser scimUser = getScimUser(user);
        if (scimUser==null) {
            if (isEmpty(user.getPassword()) && user.getOrigin().equals(OriginKeys.UAA)) {
                logger.debug("User's password cannot be empty");
                throw new InvalidPasswordException("Password cannot be empty", BAD_REQUEST);
            }
            createNewUser(user);
        }
        else {
            if (override) {
                updateUser(scimUser, user);
            } else {
                logger.debug("Override flag not set. Not registering existing user: " + user);
            }
        }
    }
877178
public void add(User user, AccessLevel accessLevel) {
        getAccessList().add(new Access(user, accessLevel));
    }
272093
def add_to_user(self, name, **attrs):
        
        user = self.get_user(name=name)
        attrs_ = user['user']
        attrs_.update(**attrs)
980439
public function setOwner($user)
    {
        // Note: We need to do a bit of uuid juggling here, because we can't bind the workspaces Owner to a specific
        // implementation, and creating entity relations via interfaces is not supported by Flow. Since the property
        // mapper will call setOwner() with a string parameter (because the property $owner is string), but developers
        // will want to use objects, we need to support both.
        if ($user === null || $user === '') {
            $this->owner = null;
            return;
        }
        if (is_string($user) && preg_match('/^([a-f0-9]){8}-([a-f0-9]){4}-([a-f0-9]){4}-([a-f0-9]){4}-([a-f0-9]){12}$/', $user)) {
            $this->owner = $user;
            return;
        }
        if (!$user instanceof UserInterface) {
            throw new \InvalidArgumentException(sprintf('$user must be an instance of UserInterface, %s given.', gettype($user)), 1447764244);
        }
        $this->owner = $this->persistenceManager->getIdentifierByObject($user);
    }
962347
protected int insertUser (final User user)
        throws UserExistsException, PersistenceException
    {
        executeUpdate(new Operation<Object>() {
            public Object invoke (Connection conn, DatabaseLiaison liaison)
                throws PersistenceException, SQLException
            {
                try {
                    _utable.insert(conn, user);
                    // update the userid now that it's known
                    user.userId = liaison.lastInsertedId(conn, null, _utable.getName(), "userId");
                    // nothing to return
                    return null;

                } catch (SQLException sqe) {
                    if (liaison.isDuplicateRowException(sqe)) {
                        throw new UserExistsException("error.user_exists");
                    } else {
                        throw sqe;
                    }
                }
            }
        });

        return user.userId;
    }
251538
public void addReportingUser(String userId)
	{
		addActiveParticipant(
				userId, 
				null, 
				null, 
				true, 
				null, 
				null);
	}
690336
def AuthorizeUser(self, user, subject):
    """"""

    user_set = self.authorized_users.setdefault(subject, set())
    user_set.add(user)
942541
public synchronized void use(Object user) {
		usage++;
		lastUsage = System.currentTimeMillis();
		if (users != null)
			users.add(user);
	}
830248
public void setUserParam(String user) {
		try {
			getSipURI().setUserParam(user);
			super.parameters.put(USER, user);
		} catch (ParseException e) {
			logger.error("error setting parameter ", e);
		}
	}
1190925
public ServerUpdater addRoleToUser(User user, Role role) {
        delegate.addRoleToUser(user, role);
        return this;
    }
1305510
def add_user(self, **kwargs):
        """"""
        user = self.UserClass(**kwargs)
        if hasattr(user, 'active'):
            user.active = True
        self.db_adapter.add_object(user)
        return user
1096082
public static br_adduser adduser(nitro_service client, br_adduser resource) throws Exception
	{
		return ((br_adduser[]) resource.perform_operation(client, "adduser"))[0];
	}
183084
private void updateUser(CmsUser user) {

        setUserPasswordStatus(user, m_forceResetPassword.getValue().booleanValue());
        user.setDescription(m_description.getValue());
        user.setManaged(!m_selfmanagement.getValue().booleanValue());
        user.setEnabled(m_enabled.getValue().booleanValue());
        m_userdata.submit(user, m_cms, new Runnable() {

            public void run() {
                //
            }
        }, true);
    }
1104345
public final void setItsUser(final UserJetty pUser) {
    this.itsUser = pUser;
    if (this.itsId == null) {
      this.itsId = new IdUserRoleJetty();
    }
    this.itsId.setItsUser(this.itsUser);
  }
333136
public void addSharedContextUser(Context sharedContext, User user) {
		this.getContextPanel(sharedContext.getIndex()).getUsersTableModel().addUser(user);
	}
1335957
public void setUser(String user) {
		if(isModifiable == ModifiableRule.NotModifiable) {
			throw new IllegalArgumentException("not allowed to set user part, the URI is not modifiable");
		}
		try {
			getSipURI().setUser(user);			
		} catch (ParseException e) {
			logger.error("error setting parameter ", e);
		}
	}
1317538
@Override
    public void addUser(ApiBaseUser user) {
        try {
            room.addUser(CommandUtil.getSfsUser(user, api));
        } catch (SFSJoinRoomException e) {
            throw new IllegalStateException(e);
        }
    }