Magento 2: Not Able to Login As A Customermain.CRITICAL: Plugin class doesn't existDynamically instanciate class with argumentsMagento 2: How to override newsletter Subscriber modelMagento offline custom Payment method with drop down listHow to solve Front controller reached 100 router match iterations in magento2Can not login with customer emai1 in magento2Customer login error magento2Magento 2.3 Can't view module's front end page output?Magento 2 How to disable price from orders, customer account and order view if custom module is enabled?Password reset updated but still able to login with old password in magento2
High voltage LED indicator 40-1000 VDC without additional power supply
Was any UN Security Council vote triple-vetoed?
Watching something be written to a file live with tail
Is it possible to record a short contained sound no longer than 60 milliseconds?
How do I deal with an unproductive colleague in a small company?
Alternative to sending password over mail?
strTok function (thread safe, supports empty tokens, doesn't change string)
I'm flying to France today and my passport expires in less than 2 months
How can I prevent hyper evolved versions of regular creatures from wiping out their cousins?
What is a clear way to write a bar that has an extra beat?
Why are electrically insulating heatsinks so rare? Is it just cost?
Do I have a twin with permutated remainders?
Why doesn't Newton's third law mean a person bounces back to where they started when they hit the ground?
Important Resources for Dark Age Civilizations?
When a company launches a new product do they "come out" with a new product or do they "come up" with a new product?
Why doesn't H₄O²⁺ exist?
Which country benefited the most from UN Security Council vetoes?
Do infinite dimensional systems make sense?
Is it unprofessional to ask if a job posting on GlassDoor is real?
Paid for article while in US on F-1 visa?
Languages that we cannot (dis)prove to be Context-Free
How can bays and straits be determined in a procedurally generated map?
NMaximize is not converging to a solution
If human space travel is limited by the G force vulnerability, is there a way to counter G forces?
Magento 2: Not Able to Login As A Customer
main.CRITICAL: Plugin class doesn't existDynamically instanciate class with argumentsMagento 2: How to override newsletter Subscriber modelMagento offline custom Payment method with drop down listHow to solve Front controller reached 100 router match iterations in magento2Can not login with customer emai1 in magento2Customer login error magento2Magento 2.3 Can't view module's front end page output?Magento 2 How to disable price from orders, customer account and order view if custom module is enabled?Password reset updated but still able to login with old password in magento2
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
When i'm trying to Login As Customer, it gives below error
a:4:{i:0;s:84:"Invalid method MagentoFrameworkSessionGenericInterceptor::isLoggedIn(Array
(
)
)";i:1;s:11155:"#0 D:wampwwwsmintmagentoappcodeCustomModuleModelDefaultModel.php(201): MagentoFrameworkSessionSessionManager->__call('isLoggedIn', Array)
#1 D:wampwwwsmintmagentoappcodeCustomModuleModelDefaultModel.php(201): MagentoFrameworkSessionGenericInterceptor->isLoggedIn()
#2 D:wampwwwsmintmagentoappcodeCustomModuleModelDefaultModel.php(114): CustomModuleModelDefaultModel->_isUserAuth()
I have already Cleared Cached & Removed data from Var folder
DefaultModel.php
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
namespace CustomModuleModel;
/**
* Implementation of Zend_Captcha
*
* @author Magento Core Team <core@magentocommerce.com>
*/
class DefaultModel extends Zend_Captcha_Image implements MagentoCaptchaModelCaptchaInterface
/**
* Key in session for captcha code
*/
const SESSION_WORD = 'word';
/**
* Min captcha lengths default value
*/
const DEFAULT_WORD_LENGTH_FROM = 3;
/**
* Max captcha lengths default value
*/
const DEFAULT_WORD_LENGTH_TO = 5;
/**
* @var MagentoCaptchaHelperData
*/
protected $_captchaData;
/**
* Captcha expire time
* @var int
*/
protected $_expiration;
/**
* Override default value to prevent a captcha cut off
* @var int
* @see Zend_Captcha_Image::$_fsize
*/
protected $_fsize = 22;
/**
* Captcha form id
* @var string
*/
protected $_formId;
/**
* @var MagentoCaptchaModelResourceModelLogFactory
*/
protected $_resLogFactory;
/**
* Overrides parent parameter as session comes in constructor.
*
* @var bool
*/
protected $_keepSession = true;
/**
* @var MagentoFrameworkSessionSessionManagerInterface
*/
protected $_session;
/**
* @param MagentoFrameworkSessionSessionManagerInterface $session
* @param MagentoCaptchaHelperData $captchaData
* @param MagentoCaptchaModelResourceModelLogFactory $resLogFactory
* @param string $formId
*/
public function __construct(
MagentoFrameworkSessionSessionManagerInterface $session, MagentoCaptchaHelperData $captchaData, MagentoCaptchaModelResourceModelLogFactory $resLogFactory, $formId
)
$this->_session = $session;
$this->_captchaData = $captchaData;
$this->_resLogFactory = $resLogFactory;
$this->_formId = $formId;
/**
* Returns key with respect of current form ID
*
* @param string $key
* @return string
*/
protected function _getFormIdKey($key)
return $this->_formId . '_' . $key;
/**
* Get Block Name
*
* @return string
*/
public function getBlockName()
return 'MagentoCaptchaBlockCaptchaDefaultCaptcha';
/**
* Whether captcha is required to be inserted to this form
*
* @param null
magento2 customer cache login customer-account
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
When i'm trying to Login As Customer, it gives below error
a:4:{i:0;s:84:"Invalid method MagentoFrameworkSessionGenericInterceptor::isLoggedIn(Array
(
)
)";i:1;s:11155:"#0 D:wampwwwsmintmagentoappcodeCustomModuleModelDefaultModel.php(201): MagentoFrameworkSessionSessionManager->__call('isLoggedIn', Array)
#1 D:wampwwwsmintmagentoappcodeCustomModuleModelDefaultModel.php(201): MagentoFrameworkSessionGenericInterceptor->isLoggedIn()
#2 D:wampwwwsmintmagentoappcodeCustomModuleModelDefaultModel.php(114): CustomModuleModelDefaultModel->_isUserAuth()
I have already Cleared Cached & Removed data from Var folder
DefaultModel.php
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
namespace CustomModuleModel;
/**
* Implementation of Zend_Captcha
*
* @author Magento Core Team <core@magentocommerce.com>
*/
class DefaultModel extends Zend_Captcha_Image implements MagentoCaptchaModelCaptchaInterface
/**
* Key in session for captcha code
*/
const SESSION_WORD = 'word';
/**
* Min captcha lengths default value
*/
const DEFAULT_WORD_LENGTH_FROM = 3;
/**
* Max captcha lengths default value
*/
const DEFAULT_WORD_LENGTH_TO = 5;
/**
* @var MagentoCaptchaHelperData
*/
protected $_captchaData;
/**
* Captcha expire time
* @var int
*/
protected $_expiration;
/**
* Override default value to prevent a captcha cut off
* @var int
* @see Zend_Captcha_Image::$_fsize
*/
protected $_fsize = 22;
/**
* Captcha form id
* @var string
*/
protected $_formId;
/**
* @var MagentoCaptchaModelResourceModelLogFactory
*/
protected $_resLogFactory;
/**
* Overrides parent parameter as session comes in constructor.
*
* @var bool
*/
protected $_keepSession = true;
/**
* @var MagentoFrameworkSessionSessionManagerInterface
*/
protected $_session;
/**
* @param MagentoFrameworkSessionSessionManagerInterface $session
* @param MagentoCaptchaHelperData $captchaData
* @param MagentoCaptchaModelResourceModelLogFactory $resLogFactory
* @param string $formId
*/
public function __construct(
MagentoFrameworkSessionSessionManagerInterface $session, MagentoCaptchaHelperData $captchaData, MagentoCaptchaModelResourceModelLogFactory $resLogFactory, $formId
)
$this->_session = $session;
$this->_captchaData = $captchaData;
$this->_resLogFactory = $resLogFactory;
$this->_formId = $formId;
/**
* Returns key with respect of current form ID
*
* @param string $key
* @return string
*/
protected function _getFormIdKey($key)
return $this->_formId . '_' . $key;
/**
* Get Block Name
*
* @return string
*/
public function getBlockName()
return 'MagentoCaptchaBlockCaptchaDefaultCaptcha';
/**
* Whether captcha is required to be inserted to this form
*
* @param null
magento2 customer cache login customer-account
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Please, post your code lines:CustomModuleModelDefaultModel.php
?
– Khoa TruongDinh
Nov 2 '16 at 3:27
HI @KhoaTruongDinh Updated. I think it's dealing with Captcha Model
– Ankit Shah
Nov 2 '16 at 3:30
HI @KhoaTruongDinh If i remove line fromdi.xml
& not calling captcha Model then it works fine
– Ankit Shah
Nov 2 '16 at 3:59
add a comment |
When i'm trying to Login As Customer, it gives below error
a:4:{i:0;s:84:"Invalid method MagentoFrameworkSessionGenericInterceptor::isLoggedIn(Array
(
)
)";i:1;s:11155:"#0 D:wampwwwsmintmagentoappcodeCustomModuleModelDefaultModel.php(201): MagentoFrameworkSessionSessionManager->__call('isLoggedIn', Array)
#1 D:wampwwwsmintmagentoappcodeCustomModuleModelDefaultModel.php(201): MagentoFrameworkSessionGenericInterceptor->isLoggedIn()
#2 D:wampwwwsmintmagentoappcodeCustomModuleModelDefaultModel.php(114): CustomModuleModelDefaultModel->_isUserAuth()
I have already Cleared Cached & Removed data from Var folder
DefaultModel.php
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
namespace CustomModuleModel;
/**
* Implementation of Zend_Captcha
*
* @author Magento Core Team <core@magentocommerce.com>
*/
class DefaultModel extends Zend_Captcha_Image implements MagentoCaptchaModelCaptchaInterface
/**
* Key in session for captcha code
*/
const SESSION_WORD = 'word';
/**
* Min captcha lengths default value
*/
const DEFAULT_WORD_LENGTH_FROM = 3;
/**
* Max captcha lengths default value
*/
const DEFAULT_WORD_LENGTH_TO = 5;
/**
* @var MagentoCaptchaHelperData
*/
protected $_captchaData;
/**
* Captcha expire time
* @var int
*/
protected $_expiration;
/**
* Override default value to prevent a captcha cut off
* @var int
* @see Zend_Captcha_Image::$_fsize
*/
protected $_fsize = 22;
/**
* Captcha form id
* @var string
*/
protected $_formId;
/**
* @var MagentoCaptchaModelResourceModelLogFactory
*/
protected $_resLogFactory;
/**
* Overrides parent parameter as session comes in constructor.
*
* @var bool
*/
protected $_keepSession = true;
/**
* @var MagentoFrameworkSessionSessionManagerInterface
*/
protected $_session;
/**
* @param MagentoFrameworkSessionSessionManagerInterface $session
* @param MagentoCaptchaHelperData $captchaData
* @param MagentoCaptchaModelResourceModelLogFactory $resLogFactory
* @param string $formId
*/
public function __construct(
MagentoFrameworkSessionSessionManagerInterface $session, MagentoCaptchaHelperData $captchaData, MagentoCaptchaModelResourceModelLogFactory $resLogFactory, $formId
)
$this->_session = $session;
$this->_captchaData = $captchaData;
$this->_resLogFactory = $resLogFactory;
$this->_formId = $formId;
/**
* Returns key with respect of current form ID
*
* @param string $key
* @return string
*/
protected function _getFormIdKey($key)
return $this->_formId . '_' . $key;
/**
* Get Block Name
*
* @return string
*/
public function getBlockName()
return 'MagentoCaptchaBlockCaptchaDefaultCaptcha';
/**
* Whether captcha is required to be inserted to this form
*
* @param null
magento2 customer cache login customer-account
When i'm trying to Login As Customer, it gives below error
a:4:{i:0;s:84:"Invalid method MagentoFrameworkSessionGenericInterceptor::isLoggedIn(Array
(
)
)";i:1;s:11155:"#0 D:wampwwwsmintmagentoappcodeCustomModuleModelDefaultModel.php(201): MagentoFrameworkSessionSessionManager->__call('isLoggedIn', Array)
#1 D:wampwwwsmintmagentoappcodeCustomModuleModelDefaultModel.php(201): MagentoFrameworkSessionGenericInterceptor->isLoggedIn()
#2 D:wampwwwsmintmagentoappcodeCustomModuleModelDefaultModel.php(114): CustomModuleModelDefaultModel->_isUserAuth()
I have already Cleared Cached & Removed data from Var folder
DefaultModel.php
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
namespace CustomModuleModel;
/**
* Implementation of Zend_Captcha
*
* @author Magento Core Team <core@magentocommerce.com>
*/
class DefaultModel extends Zend_Captcha_Image implements MagentoCaptchaModelCaptchaInterface
/**
* Key in session for captcha code
*/
const SESSION_WORD = 'word';
/**
* Min captcha lengths default value
*/
const DEFAULT_WORD_LENGTH_FROM = 3;
/**
* Max captcha lengths default value
*/
const DEFAULT_WORD_LENGTH_TO = 5;
/**
* @var MagentoCaptchaHelperData
*/
protected $_captchaData;
/**
* Captcha expire time
* @var int
*/
protected $_expiration;
/**
* Override default value to prevent a captcha cut off
* @var int
* @see Zend_Captcha_Image::$_fsize
*/
protected $_fsize = 22;
/**
* Captcha form id
* @var string
*/
protected $_formId;
/**
* @var MagentoCaptchaModelResourceModelLogFactory
*/
protected $_resLogFactory;
/**
* Overrides parent parameter as session comes in constructor.
*
* @var bool
*/
protected $_keepSession = true;
/**
* @var MagentoFrameworkSessionSessionManagerInterface
*/
protected $_session;
/**
* @param MagentoFrameworkSessionSessionManagerInterface $session
* @param MagentoCaptchaHelperData $captchaData
* @param MagentoCaptchaModelResourceModelLogFactory $resLogFactory
* @param string $formId
*/
public function __construct(
MagentoFrameworkSessionSessionManagerInterface $session, MagentoCaptchaHelperData $captchaData, MagentoCaptchaModelResourceModelLogFactory $resLogFactory, $formId
)
$this->_session = $session;
$this->_captchaData = $captchaData;
$this->_resLogFactory = $resLogFactory;
$this->_formId = $formId;
/**
* Returns key with respect of current form ID
*
* @param string $key
* @return string
*/
protected function _getFormIdKey($key)
return $this->_formId . '_' . $key;
/**
* Get Block Name
*
* @return string
*/
public function getBlockName()
return 'MagentoCaptchaBlockCaptchaDefaultCaptcha';
/**
* Whether captcha is required to be inserted to this form
*
* @param null
magento2 customer cache login customer-account
magento2 customer cache login customer-account
edited Nov 2 '16 at 3:30
Ankit Shah
asked Nov 2 '16 at 3:25
Ankit ShahAnkit Shah
4,956967144
4,956967144
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Please, post your code lines:CustomModuleModelDefaultModel.php
?
– Khoa TruongDinh
Nov 2 '16 at 3:27
HI @KhoaTruongDinh Updated. I think it's dealing with Captcha Model
– Ankit Shah
Nov 2 '16 at 3:30
HI @KhoaTruongDinh If i remove line fromdi.xml
& not calling captcha Model then it works fine
– Ankit Shah
Nov 2 '16 at 3:59
add a comment |
Please, post your code lines:CustomModuleModelDefaultModel.php
?
– Khoa TruongDinh
Nov 2 '16 at 3:27
HI @KhoaTruongDinh Updated. I think it's dealing with Captcha Model
– Ankit Shah
Nov 2 '16 at 3:30
HI @KhoaTruongDinh If i remove line fromdi.xml
& not calling captcha Model then it works fine
– Ankit Shah
Nov 2 '16 at 3:59
Please, post your code lines:
CustomModuleModelDefaultModel.php
?– Khoa TruongDinh
Nov 2 '16 at 3:27
Please, post your code lines:
CustomModuleModelDefaultModel.php
?– Khoa TruongDinh
Nov 2 '16 at 3:27
HI @KhoaTruongDinh Updated. I think it's dealing with Captcha Model
– Ankit Shah
Nov 2 '16 at 3:30
HI @KhoaTruongDinh Updated. I think it's dealing with Captcha Model
– Ankit Shah
Nov 2 '16 at 3:30
HI @KhoaTruongDinh If i remove line from
di.xml
& not calling captcha Model then it works fine– Ankit Shah
Nov 2 '16 at 3:59
HI @KhoaTruongDinh If i remove line from
di.xml
& not calling captcha Model then it works fine– Ankit Shah
Nov 2 '16 at 3:59
add a comment |
1 Answer
1
active
oldest
votes
You first need to inject the following class in your constructor: /Magento/Customer/Model/Session
:
protected $_session;
public function __construct(
...
MagentoCustomerModelSession $session,
...
)
...
$this->_session = $session;
...
if ($this->_session->isLoggedIn())
// Customer is logged in
else
// Customer is not logged in
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f143629%2fmagento-2-not-able-to-login-as-a-customer%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You first need to inject the following class in your constructor: /Magento/Customer/Model/Session
:
protected $_session;
public function __construct(
...
MagentoCustomerModelSession $session,
...
)
...
$this->_session = $session;
...
if ($this->_session->isLoggedIn())
// Customer is logged in
else
// Customer is not logged in
add a comment |
You first need to inject the following class in your constructor: /Magento/Customer/Model/Session
:
protected $_session;
public function __construct(
...
MagentoCustomerModelSession $session,
...
)
...
$this->_session = $session;
...
if ($this->_session->isLoggedIn())
// Customer is logged in
else
// Customer is not logged in
add a comment |
You first need to inject the following class in your constructor: /Magento/Customer/Model/Session
:
protected $_session;
public function __construct(
...
MagentoCustomerModelSession $session,
...
)
...
$this->_session = $session;
...
if ($this->_session->isLoggedIn())
// Customer is logged in
else
// Customer is not logged in
You first need to inject the following class in your constructor: /Magento/Customer/Model/Session
:
protected $_session;
public function __construct(
...
MagentoCustomerModelSession $session,
...
)
...
$this->_session = $session;
...
if ($this->_session->isLoggedIn())
// Customer is logged in
else
// Customer is not logged in
edited Nov 2 '16 at 4:06
Rajeev K Tomy
14.6k54589
14.6k54589
answered Nov 2 '16 at 3:33
Manish MittalManish Mittal
397
397
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f143629%2fmagento-2-not-able-to-login-as-a-customer%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Please, post your code lines:
CustomModuleModelDefaultModel.php
?– Khoa TruongDinh
Nov 2 '16 at 3:27
HI @KhoaTruongDinh Updated. I think it's dealing with Captcha Model
– Ankit Shah
Nov 2 '16 at 3:30
HI @KhoaTruongDinh If i remove line from
di.xml
& not calling captcha Model then it works fine– Ankit Shah
Nov 2 '16 at 3:59