Question: When the user clicks the "**Create an Account**" button on the login page, instead of being directed to the account creation page they are taken to the home page.

> 
> I cannot see any reason for this, this feature used to work. I can
>  only guess that it has something to do with the **SSL
>  implementation**. Does anyone have any ideas?
> 
> 
>

Answer: 
you can get all `products` with `qty` using below code

```
 <?php

    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();

    $productCollection = $objectManager->create('Magento\Catalog\Model\ResourceModel\Product\CollectionFactory');
    $StockState = $objectManager->get('\Magento\CatalogInventory\Api\StockStateInterface');

    $collection = $productCollection->create()
                ->addAttributeToSelect('*')
                ->load();

    foreach ($collection as $product){

            echo $StockState->getStockQty($product->getId(), $product->getStore()->getWebsiteId());
            echo $product->getName();
    }  

    ?>

```
**Collection stock item from Resource Model**

```
$resource = $objectManager->create('Magento\CatalogInventory\Model\ResourceModel\Stock\Item');
$select = $resource->getConnection()->select()->from($resource->getMainTable());
$stockItems = $resource->getConnection()->fetchAll($select);
foreach($stockItems as $_item){
    var_dump($_item->getData());
}

```

**if you have product object then just use following:**

```
var_dump($_product->getExtensionAttributes()->getStockItem()->getData());

```

I hope this will help