Giter Site home page Giter Site logo

mageprince / magento2-forcelogin Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 3.0 73 KB

The Force Login extension for Magento 2 force customer to login to access pages which is added from admin. You can also force login for specific customer group and storeview.

PHP 100.00%
magento2 magento2-extension forcelogin free-extension

magento2-forcelogin's Introduction

Magento2 Force Login

IN DEVELOPMENT

NOTE: DONT USE THIS MODULE IN LIVE SITE

The Force Login extension for Magento 2 force customer to login to access pages which is added from admin. You can also force login for specific customer group and storeview.

Now you can set only homepage can access without login from configurations.

Magento Market Place Link: https://marketplace.magento.com/prince-module-forcelogins.html

Installation Instruction

  • Copy the content of the repo to the app/code/Prince/Forcelogin
  • Run command: php bin/magento setup:upgrade
  • Run command: php bin/magento setup:static-content:deploy
  • Now flush cache: php bin/magento cache:flush

Contribution

Want to contribute to this extension? The quickest way is to open a pull request on GitHub.

Support

If you encounter any problems or bugs, please open an issue on GitHub.

Screenshot

Admin Grid

Admin Grid

Add/Update URL

Add/Update URL

Settings

Setting

magento2-forcelogin's People

Contributors

mageprince avatar pprincepatel avatar princektpl avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

magento2-forcelogin's Issues

i have set this module but this error create on front page

2 exception(s):
Exception #0 (Zend_Db_Statement_Exception): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'm1.prince_forcelogin' doesn't exist, query was: SELECT COUNT(*) FROM prince_forcelogin AS main_table WHERE (url = '') AND (status = '1') AND (((customer_group IS NULL) OR (FIND_IN_SET(0, customer_group)))) AND (((storeview = 0) OR (FIND_IN_SET('1', storeview))))
Exception #1 (PDOException): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'm1.prince_forcelogin' doesn't exist

Exception #0 (Zend_Db_Statement_Exception): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'm1.prince_forcelogin' doesn't exist, query was: SELECT COUNT(*) FROM prince_forcelogin AS main_table WHERE (url = '') AND (status = '1') AND (((customer_group IS NULL) OR (FIND_IN_SET(0, customer_group)))) AND (((storeview = 0) OR (FIND_IN_SET('1', storeview))))

#1 Magento\Framework\DB\Statement\Pdo\Mysql->_execute(array()) called at [vendor/magento/zendframework1/library/Zend/Db/Statement.php:303]
#2 Zend_Db_Statement->execute(array()) called at [vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php:480]
#3 Zend_Db_Adapter_Abstract->query('SELECT COUNT(*) ...', array()) called at [vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php:238]
#4 Zend_Db_Adapter_Pdo_Abstract->query('SELECT COUNT(*) ...', array()) called at [vendor/magento/framework/DB/Adapter/Pdo/Mysql.php:546]
#5 Magento\Framework\DB\Adapter\Pdo\Mysql->_query('SELECT COUNT(*) ...', array()) called at [vendor/magento/framework/DB/Adapter/Pdo/Mysql.php:613]
#6 Magento\Framework\DB\Adapter\Pdo\Mysql->query(&Magento\Framework\DB\Select#000000001021cc5e000000003e9a141f#, array()) called at [generated/code/Magento/Framework/DB/Adapter/Pdo/Mysql/Interceptor.php:128]
#7 Magento\Framework\DB\Adapter\Pdo\Mysql\Interceptor->query(&Magento\Framework\DB\Select#000000001021cc5e000000003e9a141f#, array()) called at [vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php:828]
#8 Zend_Db_Adapter_Abstract->fetchOne(&Magento\Framework\DB\Select#000000001021cc5e000000003e9a141f#, array()) called at [generated/code/Magento/Framework/DB/Adapter/Pdo/Mysql/Interceptor.php:1623]
#9 Magento\Framework\DB\Adapter\Pdo\Mysql\Interceptor->fetchOne(&Magento\Framework\DB\Select#000000001021cc5e000000003e9a141f#, array()) called at [vendor/magento/framework/Data/Collection/AbstractDb.php:222]
#10 Magento\Framework\Data\Collection\AbstractDb->getSize() called at [app/code/Prince/Forcelogin/Helper/Data.php:184]
#11 Prince\Forcelogin\Helper\Data->getUrlCollection('') called at [app/code/Prince/Forcelogin/Observer/Forcelogin.php:79]
#12 Prince\Forcelogin\Observer\Forcelogin->execute(&Magento\Framework\Event\Observer#000000001021cc1f000000003e9a141f#) called at [vendor/magento/framework/Event/Invoker/InvokerDefault.php:88]
#13 Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(&Prince\Forcelogin\Observer\Forcelogin#000000001021cc20000000003e9a141f#, &Magento\Framework\Event\Observer#000000001021cc1f000000003e9a141f#) called at [vendor/magento/framework/Event/Invoker/InvokerDefault.php:74]
#14 Magento\Framework\Event\Invoker\InvokerDefault->dispatch(array('instance' => 'Prince\Forcelogi...', 'shared' => false, 'name' => 'forcelogin'), &Magento\Framework\Event\Observer#000000001021cc1f000000003e9a141f#) called at [vendor/magento/framework/Event/Manager.php:66]
#15 Magento\Framework\Event\Manager->dispatch('layout_render_be...', array()) called at [generated/code/Magento/Framework/Event/Manager/Proxy.php:95]
#16 Magento\Framework\Event\Manager\Proxy->dispatch('layout_render_be...') called at [vendor/magento/framework/View/Result/Layout.php:167]
#17 Magento\Framework\View\Result\Layout->renderResult(&Magento\Framework\App\Response\Http\Interceptor#000000001021caba000000003e9a141f#) called at [vendor/magento/framework/Interception/Interceptor.php:58]
#18 Magento\Framework\View\Result\Page\Interceptor->___callParent('renderResult', array(&Magento\Framework\App\Response\Http\Interceptor#000000001021caba000000003e9a141f#)) called at [vendor/magento/framework/Interception/Interceptor.php:138]
#19 Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Response\Http\Interceptor#000000001021caba000000003e9a141f#) called at [vendor/magento/framework/Interception/Interceptor.php:153]
#20 Magento\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult', array(&Magento\Framework\App\Response\Http\Interceptor#000000001021caba000000003e9a141f#), array(array('result-messages', 'result-builtin-c...', 'result-varnish-c...'))) called at [generated/code/Magento/Framework/View/Result/Page/Interceptor.php:130]
#21 Magento\Framework\View\Result\Page\Interceptor->renderResult(&Magento\Framework\App\Response\Http\Interceptor#000000001021caba000000003e9a141f#) called at [vendor/magento/framework/App/Http.php:120]
#22 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:24]
#23 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:261]
#24 Magento\Framework\App\Bootstrap->run(&Magento\Framework\App\Http\Interceptor#000000001021cab1000000003e9a141f#) called at [index.php:39]

Getting login request (again) in checkout

Magento 2.2.4
v1.0.2 of plugin

I'm using the blacklist mode and added the all the customer pages, catalog forms, cart and checkout to the require-login list. Our products require a third party tool to configure them so the customer has to be logged in to tie an id to the product for the information exchanged with the design tool.
When you add the product to cart, the cart pulls up fine but when you click 'go to checkout', despite being already logged in, sometimes it still pops up a log-in dialogue. (still trying to isolate when/why it does and when/why it doesn't)
If you sign in, it then brings you back to the Customer Dashboard. If you click the cart again the cart comes up fine, but if you click 'Go to Checkout' from the cart (or enter the checkout url manually) it again pops up the login dialogue which again brings you back to the Dashboard. Rinse, wash, repeat.

Issue in url listing in the admin panel in Magento 2.3

I have working on Magento 2.3 and i have use this plugin but it's give me issue in admin panel, The issue regarding display url list which is i use.
[1 exception(s):
Exception #0 (InvalidArgumentException): Class argument is invalid: Magento\Framework\View\Element\UiComponent\Context

Exception #0 (InvalidArgumentException): Class argument is invalid: Magento\Framework\View\Element\UiComponent\Context

#1 Magento\Framework\Data\Argument\InterpreterInterface\Proxy->evaluate() called at [vendor/magento/framework/Data/Argument/Interpreter/Composite.php:61]
#2 Magento\Framework\Data\Argument\Interpreter\Composite->evaluate() called at [vendor/magento/module-ui/Config/Data.php:164]
#3 Magento\Ui\Config\Data->evaluateComponentArguments() called at [vendor/magento/module-ui/Config/Data.php:111]
#4 Magento\Ui\Config\Data->initData() called at [vendor/magento/module-ui/Config/Data.php:136]
#5 Magento\Ui\Config\Data->get() called at [vendor/magento/framework/View/Layout/Reader/UiComponent.php:100]
#6 Magento\Framework\View\Layout\Reader\UiComponent->interpret() called at [vendor/magento/framework/View/Layout/ReaderPool.php:105]
#7 Magento\Framework\View\Layout\ReaderPool->interpret() called at [vendor/magento/framework/View/Layout/Reader/Container.php:89]
#8 Magento\Framework\View\Layout\Reader\Container->interpret() called at [vendor/magento/framework/View/Layout/ReaderPool.php:105]
#9 Magento\Framework\View\Layout\ReaderPool->interpret() called at [vendor/magento/framework/View/Page/Config/Reader/Body.php:68]
#10 Magento\Framework\View\Page\Config\Reader\Body->interpret() called at [vendor/magento/framework/View/Layout/ReaderPool.php:105]
#11 Magento\Framework\View\Layout\ReaderPool->interpret() called at [vendor/magento/framework/View/Layout.php:325]
#12 Magento\Framework\View\Layout->generateElements() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:89]
#13 Magento\Framework\View\Layout\Interceptor->generateElements() called at [vendor/magento/framework/View/Layout/Builder.php:129]
#14 Magento\Framework\View\Layout\Builder->generateLayoutBlocks() called at [vendor/magento/framework/View/Page/Builder.php:55]
#15 Magento\Framework\View\Page\Builder->generateLayoutBlocks() called at [vendor/magento/framework/View/Layout/Builder.php:65]
#16 Magento\Framework\View\Layout\Builder->build() called at [vendor/magento/framework/View/Page/Config.php:224]
#17 Magento\Framework\View\Page\Config->build() called at [vendor/magento/framework/View/Page/Config.php:247]
#18 Magento\Framework\View\Page\Config->getTitle() called at [generated/code/Magento/Framework/View/Page/Config/Interceptor.php:50]
#19 Magento\Framework\View\Page\Config\Interceptor->getTitle() called at [app/code/Prince/Forcelogin/Controller/Adminhtml/Forcelogin/Index.php:69]
#20 Prince\Forcelogin\Controller\Adminhtml\Forcelogin\Index->execute() called at [generated/code/Prince/Forcelogin/Controller/Adminhtml/Forcelogin/Index/Interceptor.php:37]
#21 Prince\Forcelogin\Controller\Adminhtml\Forcelogin\Index\Interceptor->execute() called at [vendor/magento/framework/App/Action/Action.php:108]
#22 Magento\Framework\App\Action\Action->dispatch() called at [vendor/magento/module-backend/App/AbstractAction.php:231]
#23 Magento\Backend\App\AbstractAction->dispatch() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#24 Prince\Forcelogin\Controller\Adminhtml\Forcelogin\Index\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#25 Prince\Forcelogin\Controller\Adminhtml\Forcelogin\Index\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/module-backend/App/Action/Plugin/Authentication.php:143]
#26 Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch() called at [vendor/magento/framework/Interception/Interceptor.php:135]
#27 Prince\Forcelogin\Controller\Adminhtml\Forcelogin\Index\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#28 Prince\Forcelogin\Controller\Adminhtml\Forcelogin\Index\Interceptor->___callPlugins() called at [generated/code/Prince/Forcelogin/Controller/Adminhtml/Forcelogin/Index/Interceptor.php:52]
#29 Prince\Forcelogin\Controller\Adminhtml\Forcelogin\Index\Interceptor->dispatch() called at [vendor/magento/framework/App/FrontController.php:159]
#30 Magento\Framework\App\FrontController->processRequest() called at [vendor/magento/framework/App/FrontController.php:99]
#31 Magento\Framework\App\FrontController->dispatch() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#32 Magento\Framework\App\FrontController\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#33 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#34 Magento\Framework\App\FrontController\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:26]
#35 Magento\Framework\App\FrontController\Interceptor->dispatch() called at [vendor/magento/framework/App/Http.php:137]
#36 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:24]
#37 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:261]
#38 Magento\Framework\App\Bootstrap->run() called at [index.php:39]
]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.