Setup data fields.

@param string $username
@param string $password

@return bool
180718
public function setupDataFields($username, $password)
    {
        $error = false;
        $apiModel = false;
        if ($this->helper->isEnabled()) {
            $apiModel = $this->helper->getWebsiteApiClient(0, $username, $password);
        }
        if (!$apiModel) {
            $error = true;
            $this->helper->log('setupDataFields client is not enabled');
        } else {
            //validate account
            $accountInfo = $apiModel->getAccountInfo();
            if (isset($accountInfo->message)) {
                $this->helper->log('setupDataFields ' . $accountInfo->message);
                $error = true;
            } else {
                $dataFields = $this->dataField->getContactDatafields();
                foreach ($dataFields as $key => $dataField) {
                    $apiModel->postDataFields($dataField);
                    //map the successfully created data field
                    $this->helper->saveConfigData(
                        'connector_data_mapping/customer_data/' . $key,
                        strtoupper($dataField['name']),
                        'default',
                        0
                    );
                    $this->helper->log('setupDataFields successfully connected : ' . $dataField['name']);
                }
            }
        }

        return $error == true ? false : true;
    }
229494
public function setUsername($username)
    {
        if($username == $this->username){
            return true;
        }
        if ($this->usernameExists($username)) {
            return false;
        }

        if ($this->setUsernameStatement === null) {
            $this->setUsernameStatement = $this->connection->prepare("UPDATE User SET username = ? WHERE username = ?");
        }
        $wasLoggedIn = $this->isLoggedIn();

        $this->setUsernameStatement->execute(array($username, $this->username));
        $this->username = $username;

        if ($wasLoggedIn) {
            $this->updateLoginSession();
        }
        $this->notifyObservers(User::EVENT_USERNAME_UPDATE);
        return true;
    }
412160
public function setCredentials($username, $password)
    {
        $this->username = $username;
        $this->password = $password;
        $this->token = '';
        $this->accessToken = '';
        return $this;
    }
1165638
public function setAuthCredentials($username, $password)
    {

        $this->setUsername($username);

        $this->setPassword($password);

        $this->authCredentials = base64_encode(
            "{$this->username}:{$this->password}"
        );

    }
620286
public function logIn($username,$password) {
		session_regenerate_id(true);
		$sql = "SELECT id,password FROM {$this->primaryTable} WHERE username=:username AND inactive=0";
		if ($result = $this->executeQuery($sql,array(":username"=>$username))) {
			if (password_verify($password,$result[0]['password'])) {
				$this->setSessionUserId($result[0]['id']);
				return true;			
			}
		}
		return false;
	}
862383
public function setup($userName, $password) {
        // we MUST have the username and password. No Blanks allowed!
        //
        // remove blanks else Empty doesn't work
        $userName = trim($userName);
        $password = trim($password);

        if (empty($userName) || empty($password)) {
            //Throw exception if the required parameters were not found
            $this->log('parameters did not include username and/or password');
            throw new RequiredParameterMissingException('One or more required parameters was not supplied. Both userName and password required!');
        }

        $this->userName = $userName;
        $this->password = $password;
    }
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)),
        ));
    }
719299
public function login($username, $password)
    {
        $this->visit("wp-login.php");
        $currentPage = $this->getSession()->getPage();

        $currentPage->fillField('user_login', $username);
        $currentPage->fillField('user_pass', $password);
        $currentPage->findButton('wp-submit')->click();

        assertTrue($this->getSession()->getPage()->hasContent('Dashboard'));
    }
406210
protected function fireBindingEvent($username, $password)
    {
        if (isset($this->events)) {
            $this->events->fire(new Binding($this->connection, $username, $password));
        }
    }
1245935
protected function authenticate($username, $password)
    {
        if (!isset($username)) {
            return ValidationResult::error("username isn't set");
        }
        
        if (!isset($password)) {
            return ValidationResult::error("password isn't set");
        } 
        
        if (!isset(self::$users[$username]) || !password_verify($password, self::$users[$username]['password'])) {
            return ValidationResult::error("Invalid credentials");
        }

        return ValidationResult::success();
    }
1041525
public function login($username = 'anonymous', $password = '')
    {
        $result = $this->ftp->login($username, $password);

        if ($result === false) {
            throw new FtpException('Login incorrect');
        }

        return $this;
    }
219641
public function createAddressBooks($username, $password)
    {
        $addressBooks = [
            ['name' => 'Magento_Customers', 'visibility' => 'Private'],
            ['name' => 'Magento_Subscribers', 'visibility' => 'Private'],
            ['name' => 'Magento_Guests', 'visibility' => 'Private'],
        ];
        $client = false;
        if ($this->helper->isEnabled()) {
            $client = $this->helper->getWebsiteApiClient(0, $username, $password);
        }
        if (!$client) {
            $error = true;
            $this->helper->log('createAddressBooks client is not enabled');
        } else {
            $error = $this->validateAccountAndCreateAddressbooks($client, $addressBooks);
        }

        return $error == true ? false : true;
    }
849428
public function basicAuth($username, $password)
    {
        $this->username = $username;
        $this->password = $password;
        return $this;
    }
169018
public function setUsername($username, $password = null) {
		$this->username = (string) $username;
		
		if ($password !== null) {
			$this->setPassword($password);
		}
		
		return $this;
	}
291707
public function createUser($username, $password, $privilege = null)
    {
        $query = sprintf('CREATE USER %s WITH PASSWORD \'%s\'', $username, $password);

        if ($privilege) {
            $query .= " WITH $privilege PRIVILEGES";
        }

        return $this->client->query(null, $query);
    }
133692
public function setCredentials($username, $password)
    {
        $this->username = $username;
        $this->password = $password;

        return $this;
    }
373148
public function updatePassword($username, $password)
    {
        /** @var UserInterface|EloquentUser $user */
        if ( ! ($user = $this->sentinel->findByCredentials(['email' => $username]))) {
            return false;
        }

        return $this->sentinel->update($user, ['password' => $password]) instanceof UserInterface;
    }