src/Brick/User/UserManager.php
public function changeUserPassword($password, $newPassword, $userId)
	{
		$user = $this->get($userId);

		if (!Passwords::verify($password, $user->password)) {
			throw new \InvalidArgumentException('The origin password is incorrect');

		} else {
			$this->repository->update($userId, ['password' => Passwords::hash($newPassword)]);

			return TRUE;
		}
	}
public function changeUserPassword($password, $newPassword, $userId)
	{
		$user = $this->get($userId);

		if (!Passwords::verify($password, $user->password)) {
			throw new \InvalidArgumentException('The origin password is incorrect');

		} else {
			$this->repository->update($userId, ['password' => Passwords::hash($newPassword)]);

			return TRUE;
		}
	}
@param $password string
@param $newPassword string
@param $userId int

@return bool
@throws \InvalidArgumentException