Add user to the group.

@param string $login
547401
public function addLogin($login)
    {
        if (!isset($this->logins[$login])) {
            $this->logins[$login] = true;
            $this->dispatcher->dispatch(self::EVENT_NEW_USER, [$this, $login]);
        }
    }
776971
public function getLoginGroupLabel($login)
    {
        $group = $this->getLoginUserGroups($login);

        $groupName = "Admin";
        if ($group) {
            if ($groupName) {
                $groupName = $this->getGroupLabel($group->getName());
            }
        }

        return $groupName;
    }
136210
public function login($login, $password) {
		$user = $this->findUser($login);

		if ($user) {
			$this->user = $user;
			$this->recognized = true;

			if ($this->verifyUser($user, $password)) {
				$this->authenticated = true;

				$session = $this->findSession($user);
				if ($session === null) {
					$session = $this->createSession($user);
				}

				$this->session = $session;
				return true;
			}
		}

		return false;
	}
130121
public function attachUser( $user )
  {
    if( is_object($user))
      $user = $user->getKey();

    if( is_array($user))
      $user = $user['id'];

    $this->users()->attach( $user );
  }
728360
private function addGroup($group)
	{
		if($group != null)
		{
			if($this->groups == null)
				$this->groups = array();
			$this->groups[] = $group;
		}
	}
1199657
public function add($username, $password)
    {
        $this->database->table(self::TABLE_NAME)->insert(array(
            self::COLUMN_NAME => $username,
            self::COLUMN_PASSWORD_HASH => Passwords::hash(self::removeCapsLock($password)),
        ));
    }
1163084
protected function fillUsername(string $username): void
    {
        $this->context->findElement($this->fields['username'], $this->defaultTimeout)->setValue($username);
    }
686761
public function addUser(User $user): bool
	{
		if(!$this->isPersisted)
		{
			throw new LogicException('You can only add a user to a group that exist in the database.');
		}

		if(!$user->isPersisted())
		{
			throw new LogicException('You can only add a user that exist in the database to a group.');
		}

		return $this->users()->link($user);
	}
1317604
public function iHaveUserInGroup( $username, $parentGroupName )
    {
        $email = $this->findNonExistingUserEmail( $username );
        $password = $this->getUserManager()->getDefaultPassword();
        $user = $this->getUserManager()->ensureUserExists( $username, $email, $password, $parentGroupName );
        $this->addValuesToKeyMap( $email, $user->email );
    }
765036
public function getLoginUserGroups($login)
    {
        $groupName = $this->adminGroupConfiguration->getLoginGroupName($login);
        if (empty($groupName)) {
            $groupName = 'guest';
        }

        return $this->getUserGroup("$groupName");
    }
827178
public function handle(Login $event)
    {
        $user = $event->user;
        $ip = $this->request->ip();
        $userAgent = $this->request->userAgent();
        $known = $user->authentications()->whereIpAddress($ip)->whereUserAgent($userAgent)->first();

        $authenticationLog = new AuthenticationLog([
            'ip_address' => $ip,
            'user_agent' => $userAgent,
            'login_at' => Carbon::now(),
        ]);

        $user->authentications()->save($authenticationLog);

        if (! $known && config('authentication-log.notify')) {
            $user->notify(new NewDevice($authenticationLog));
        }
    }
1328835
public function setUsername($username = '')
    {
        $this->username = $username;
        $this->_debug->info(__FUNCTION__, 'setUsername: ', $this->username);
    }
898435
public function addLostPassRequest($login, $email)
    {
        $table = $this->getServiceLocator()->get('MelisLostPasswordTable');
        $data = $this->getPassRequestDataByLogin($email);
        $success = false;
        if(!$this->isDataExists($login)) {
            $table->save(array(
                'rh_id' => null,
                'rh_login' => $login,
                'rh_email' => $email,
                'rh_hash' => $this->generateHash(),
                'rh_date' => date('Y-m-d H:i:s')
            ));
            // first email
            $success = $this->sendPasswordLostEmail($login, $email);
            
        }
        else {
            // resend email
            $table->update(array(
                'rh_date' => date('Y-m-d H:i:s')
            ), 'rh_login', $login);
            $success = $this->sendPasswordLostEmail($login, $email);
        }
        
        return $success;
    }
171908
public function addEntry(LogEntry $entry)
	{
		// Convert the date.
		$entry->date = $entry->date->format($this->db->getDateFormat());

		$this->db->insertObject($this->table, $entry);
	}
548188
public function addUser($userId)
    {
        if (true === is_numeric($userId) && false === in_array($userId, $this->users)) {
            $this->users[] = (int)$userId;
        }
        return $this;
    }
408333
function group_add_user($group,$user){
        //adding a user is a bit fiddly, we need to get the full DN of the user
        //and add it using the full DN of the group
        
        //find the user's dn
        $user_info=$this->user_info($user,array("cn"));
        if ($user_info[0]["dn"]==NULL){ return (false); }
        $user_dn=$user_info[0]["dn"];
        
        //find the group's dn
        $group_info=$this->group_info($group,array("cn"));
        if ($group_info[0]["dn"]==NULL){ return (false); }
        $group_dn=$group_info[0]["dn"];
        
        $add=array();
        $add["member"] = $user_dn;
        
        $result=@ldap_mod_add($this->_conn,$group_dn,$add);
        if ($result==false){ return (false); }
        return (true);
    }
960062
public function addUser($name, $userName, $email, $password)
    {
        $model = $this->getUserDefinition()->modelInstance();
        $model->setName($name);
        $model->setEmail($email);
        $model->setUsername($userName);
        $model->setPassword($password);

        $this->save($model);
    }