I want to create a custom register form.
But, the user can only create an account if he is in my XML File.
For now, I get the information of the user from my XML.
Then I want to use this information to create the account, but the user only needs to add his name, mail and password (the other information will fit into the database automatically with info from XML (like address, country...)).
But I don't know where to start,
Any Guidance will be appreciated. Thanks in Advance.
EDIT : i believe that the answer to my question is something like this How to add a customer programmatically in Magento 2?
But when I try do add something in my constructor, I have a white page and that's all.
Here's my code :
<?php
namespace Portail\Test\Controller\Connexion;
use Magento\Framework\App\Action\Action;
use Magento\Framework\App\Action\Context;
use Magento\Framework\App\ObjectManager;
use Magento\Framework\View\Result\PageFactory;
use Magento\Store\Model\StoreManagerInterface;
class Form extends Action
{
protected $_pageFactory;
protected $storeManager;
public function __construct(Context $context, StoreManagerInterface $storeManager, PageFactory $pageFactory)
{
$this->storeManager = $storeManager;
$this->_pageFactory = $pageFactory;
return parent::__construct($context);
}
...
}
Without StoreManagerInterface $storeManager in constuctor i haven't white page