Change the password of a user and sent them on their way.
@param User $user
@param $password
@param $confirmPassword
@return string
@throws \Neuron\Exceptions\DataNotSet
493066
private function processChangePassword(User $user, $password, $confirmPassword)
    {
        if (empty($password)) {
            return Errors::PASSWORD_INVALID;
        }

        if ($password !== $confirmPassword) {
            return Errors::CONFIRM_PASSWORD_INVALID;
        }

        /** @var UserMapper $mapper */
        $mapper = MapperFactory::getUserMapper();

        $user->setPassword($password);
        $mapper->update($user);

        // Now login this user.
        return $this->module->login($this->request, $user);
    }
1244385
public function login($user, $password)
    {
        /* @var $session \Mage_Customer_Model_Session */
        $session = Mage::getSingleton('customer/session');
        return $session->login($user, $password);
    }
1167054
protected function verifyUser($user, $password)
    {
        if (!isset($this->userList[$user]))
        {
            return false;
        }
        if ($this->userList[$user] != $password)
        {
            return false;
        }
        return true;
    }
121439
public function updatePassword(User $user, $password) : User
    {
        $user->updatePassword($password);
        $this->repository->add($user);

        return $user;
    }
1212438
public function setPasswordAttribute($password)
    {
        if (!empty($password)) {
            $password = bcrypt($password);
            JWTUtilities::invalidateTokenByUserId($this->id);
            // When password is set user account must be confirmed. Confirming user
            // account here with confirm_code = null.
            // confirm_code = 'y' indicates cases where account is confirmed by user
            // using confirmation email.
            if (isset($this->attributes['confirm_code']) && $this->attributes['confirm_code'] !== 'y') {
                $this->attributes['confirm_code'] = null;
            }
        }

        $this->attributes['password'] = $password;
    }
978313
public function initSessionByCredentials($user, $password) {
      $response = $this->request('get', 'initSession', ['auth' => [$user, $password]]);
      if ($response->getStatusCode() != 200
         || !$this->sessionToken = json_decode($response->getBody()->getContents(), true)['session_token']) {
         $body = json_decode($response->getBody()->getContents());
         throw new Exception(ErrorHandler::getMessage($body[0]));
      }
      return true;
   }
1026197
private function setEncodePassword(User $user, $plainPassword)
    {
        $password = $this->encoderFactory->getEncoder($user)->encodePassword(
            $plainPassword,
            $user->getSalt()
        );

        $user->setPassword($password);
    }
1105246
def change_password(self, password):
        

        def cb():
            if not utils.is_password_valid(password):
                raise exceptions.AuthError("Invalid Password")
            self.user.change_password(password)
            return True

        return signals.user_update(self, ACTIONS["PASSWORD"], cb)
304431
public static function authBasic($user, $password, $request = null)
    {
        return ($request ? $request->getBasicAuthUser() : Lb::app()->getBasicAuthUser()) == $user &&
        HashHelper::hash($request ? $request->getBasicAuthPassword() : Lb::app()->getBasicAuthPassword()) == $password;
    }
564229
public function changePasswordWithRecoveryToken(User $user, int $tokenId, string $token, string $newPassword)
    {
        if (!$this->resetTokenProvider) {
            throw new PasswordResetProhibitedException('The configuration currently prohibits the resetting of passwords!');
        }

        $auth = $this->authenticationProvider->findByUserId($user->getId());
        if (!$auth) {
            throw new NoSuchUserException();
        }

        $remote = new RemoteAddress();
        $remote->setUseProxy(true);

        $resetToken = $this->resetTokenProvider->get($tokenId);
        if (!$resetToken) {
            throw new InvalidResetTokenException();
        }

        if (!$resetToken->isValid($auth, $token, $remote->getIpAddress(), $this->validateFingerprint, $this->validateIp)) {
            throw new InvalidResetTokenException();
        }

        $this->resetPassword($user, $newPassword);
        $resetToken->setStatus(UserResetTokenInterface::STATUS_USED);
        $this->resetTokenProvider->update($resetToken);
    }
1174272
public function login($user, $password)
    {
        return $this->requestAndResponse('LOGIN', $this->escapeString($user, $password), true);
    }
477583
public function setPassword($password){
        if(!$this->setModified('password', $password)->isModified()){
            return $this;
        }
        $this->password = $password;
        $this->passwordChanged = true;
        return $this;
    }
818384
public function verify($user, $password)
    {
        $this->load();
        if (!isset($this->users[$user])) {
            return false;
        }
        return $this->users[$user]->verify($password);
    }
995788
public function setPassword(User $user, $password)
    {
        $encoder = $this->container->get('security.encoder_factory')
            ->getEncoder($user);

        $salt = $this->createSalt();

        $encryptedPassword = $encoder->encodePassword($password, $salt);

        $user
            ->setPassword($encryptedPassword)
            ->setSalt($salt);
    }
451805
public function setLoginPassword(string $password, bool $encoded = false) : UserInterface
    {
        $this->login_password   = $encoded == true ? $password : $this->encodePassword($password);

        return $this;
    }
473533
protected function resetPassword($user, $password)
    {
        $user->forceFill([
            'password' => bcrypt($password),
            'remember_token' => Str::random(60),
        ])->save();
    }
670327
public function change_password($old_password, $new_password, $username = null)
	{
		try
		{
			return (bool) $this->update_user(array('old_password' => $old_password, 'password' => $new_password), $username);
		}
		// Only catch the wrong password exception
		catch (SimpleUserWrongPassword $e)
		{
			return false;
		}
	}