adds a user to the invitation list
491991
def addUser(self, username, password,
                firstname, lastname,
                email, role):
        """"""
        self._invites.append({
            "username":username,
            "password":password,
            "firstname":firstname,
            "lastname":lastname,
            "fullname":"%s %s" % (firstname, lastname),
            "email":email,
            "role":role
        })
867939
def add_user(
        self,
        name, 
        **attrs
        ):
        """"""
        if self.user_exists(name):
            raise KubeConfError("user with the given name already exists.")

        users = self.get_users()
        
        # Add parameters.
        new_user = {'name': name, 'user':{}}
        attrs_ = new_user['user']
        attrs_.update(attrs)
        users.append(new_user)
1192969
def add(member_address, options={})
      params = {:address => member_address}
      Mailgun.submit :post, list_member_url, params.merge(options)
    end
654257
def insert(self, index, value):
        """"""
        self.check(value)
        self._user_list.insert(index, value)
986798
def invite(body)
      raise ArgumentError unless body.is_a?(Array)
      raise ArgumentError unless body.first.is_a?(Hash)
      api.post('invite', body, 'application/json')
    end
1140074
def invitation_accepted(event):
    
    request = getRequest()
    storage = get_storage()
    if event.token_id not in storage:
        return

    ws_uid, username = storage[event.token_id]
    storage[event.token_id]
    acl_users = api.portal.get_tool('acl_users')
    acl_users.updateCredentials(
        request,
        request.response,
        username,
        None
    )
    catalog = api.portal.get_tool(name="portal_catalog")
    brain = catalog.unrestrictedSearchResults(UID=ws_uid)[0]
    with api.env.adopt_roles(["Manager"]):
        ws = IWorkspace(brain.getObject())
        for name in ws.members:
            member = api.user.get(username=name)
            if member is not None:
                if member.getUserName() == username:
                    api.portal.show_message(
                        _('Oh boy, oh boy, you are already a member'),
                        request,
                    )
                    break
        else:
            ws.add_to_team(user=username)
            api.portal.show_message(
                _('Welcome to our family, Stranger'),
                request,
            )
552012
@Override
    public SendInvitation invitees(ApiBaseUser... users) {
        this.invitees.addAll(Arrays.asList(users));
        return this;
    }
613423
def add_to_group(self, group, user):
        
        data = {'group': group, 'user': user}
        return self.post('addUserToGroup', data)
801773
function(event, state, member) {
        if (member.membership === "invite") {
            // We do NOT add invited members because people love to typo user IDs
            // which would then show up in these lists (!)
            return;
        }

        const user = this.users[member.userId] || new User(member.userId);
        if (member.name) {
            user.setDisplayName(member.name);
            if (member.events.member) {
                user.setRawDisplayName(
                    member.events.member.getDirectionalContent().displayname,
                );
            }
        }
        if (member.events.member && member.events.member.getContent().avatar_url) {
            user.setAvatarUrl(member.events.member.getContent().avatar_url);
        }
        this.users[user.userId] = user;
    }
359163
def add_registration(self, username, first_name, last_name, email, password=""):
        
        register_user = self.appbuilder.sm.add_register_user(
            username, first_name, last_name, email, password
        )
        if register_user:
            if self.send_email(register_user):
                flash(as_unicode(self.message), "info")
                return register_user
            else:
                flash(as_unicode(self.error_message), "danger")
                self.appbuilder.sm.del_register_user(register_user)
                return None
81151
function addUser(user) {
	var slElement = $(document.createElement("option"));
	slElement.attr("value", user);
	slElement.text(user);
	$("#usersList").append(slElement);
}
270654
def add_request_participants(self, issue_id_or_key, users_list):
        
        url = 'rest/servicedeskapi/request/{}/participant'.format(issue_id_or_key)
        data = {'usernames': users_list}

        return self.post(url, data=data)
145396
def send_invite_user_email(self, user, user_invitation):
        """"""

        # Verify config settings
        if not self.user_manager.USER_ENABLE_EMAIL: return
        if not self.user_manager.USER_ENABLE_INVITE_USER: return

        # The user param points to the inviter
        # The user_invitation param points to the invitee
        invited_by_user = user

        # Use the invitation email
        email = user_invitation.email

        # Create a dummy user object to an empty name for the invitee
        user = self.user_manager.db_manager.UserClass(email=email)

        # Generate a accept_invitation_link
        token = self.user_manager.generate_token(user_invitation.id)
        accept_invitation_link = url_for('user.register', token=token, _external=True)

        # Render email from templates and send it via the configured EmailAdapter
        self._render_and_send_email(
            email,
            user,
            self.user_manager.USER_INVITE_USER_EMAIL_TEMPLATE,
            accept_invitation_link=accept_invitation_link,
            invited_by_user=invited_by_user,
        )
88869
def add_user(self, attrs):
        
        username = attrs[self.key]
        if username in self.users:
            raise UserAlreadyExists(username, self.backend_name)
        self.users[username] = attrs
        self.users[username]['groups'] = set([])
346114
public function addUser($tagId, $userList, $partyList)
    {
        $params = array(           
                    'tagid'     => $tagId,
                    'userlist'  => $userList,
                    'partylist' => $partyList
                );

        return $this->http->jsonPost(self::API_ADD_USER, $params);
    }
622678
def process_invite(room, event)
      sender = get_user(event['sender'])
      invitee = get_user(event['state_key'])
      invitee.process_invite room, sender, event
    end
916112
def invite(self, email, roles=None):
        
        if roles is None:
            role_ids = [self.roles['Guest'].roleId]
        elif roles == "ALL":
            role_ids = list([i.id for i in self.roles])
        else:
            if "Guest" not in roles:
                roles.append('Guest')
            role_ids = list([i.id for i in self.roles if i.name in roles])

        self._router.invite_user(data=json.dumps({
            "organizationId": self.organizationId,
            "email": email,
            "roles": role_ids}))