zfcuser

Zend Framework 2 - Global check for authentication with ZFCUser

人盡茶涼 提交于 2019-12-17 15:46:31
问题 I installed ZFCUser successfully. Now I wonder if there is a way to globally check for authentication. As outlined in the wiki there are several ways to check for auth. They all work but do I have to put the check-if-clause really in every single action? All my sites should be only accessable when beeing logged in and if not, you should be rerouted to the login page. Does anybody know if there's a central place where I can put this logic? 回答1: To be honest, I don't think it is a good idea to

Composer fails to update with zfc-user-doctrine-orm

两盒软妹~` 提交于 2019-12-13 07:34:58
问题 i have the following composer.json { "name": "zendframework/skeleton-application", "description": "Skeleton Application for ZF2", "license": "BSD-3-Clause", "keywords": [ "framework", "zf2" ], "homepage": "http://framework.zend.com/", "require": { "php": ">=5.3.3", "zendframework/zendframework": "2.2.*", "doctrine/doctrine-orm-module": "*", "bjyoungblood/bjy-authorize": "1.2.*", "zf-commons/zfc-user": "dev-master", "zendframework/zend-developer-tools": "*", "zendframework/zftool": "dev-master

Extending ZfcUsers UserController

烈酒焚心 提交于 2019-12-13 04:18:34
问题 i want to extend the UserController with an setEventManager implementation, to display another layout - just with an login mask. When i call the url www.example.com i get my Controller, with the other layout. But if type in a wrong username, i redirected to www.exmpale.com/user/login and i get the default layout. How i can overwrite all routes from ZfcUser Module and redirect them to my own controller, to ensure, the UserController can not called directly. Thank you. 回答1: If I understand your

No role detected by BjyAuthorize when login

无人久伴 提交于 2019-12-12 12:27:39
问题 I am working with ZF2, Doctrine ORM and BjyAuthorize. The problem is that when I got logged in the method getRoles of the identity returns empty. class User implements UserInterface, ProviderInterface{ /** * @var \Doctrine\Common\Collections\Collection * * @ORM\ManyToMany(targetEntity="Application\Entity\Role", inversedBy="user") * @ORM\JoinTable(name="user_role_linker", * joinColumns={ * @ORM\JoinColumn(name="user_id", referencedColumnName="user_id") * }, * inverseJoinColumns={ * @ORM

ZfcUser Redirect to page of my choice after Registration

浪尽此生 提交于 2019-12-12 00:38:54
问题 I have been trying to redirect to a page/route of my choice after zfcuser registration. Currently it redirects to the login page. I was able to make changes on the init event where I am now using the recaptcha instead of figlet. I have added a listener on my module's bootstrap method on zfcuser's register event. But not sure what to do afterwards so that I can redirect to a page of my choice after user registers. Any help would be much appreciated as it would also help me alot on my basic

Extending ZfcUser's UserController in custom module

白昼怎懂夜的黑 提交于 2019-12-11 21:27:40
问题 In my custom Module I have a custom UserController that extends the ZfcUser vendor's UserController in order to customize the indexAction and registerAction . namesapce MyModule; class UserController extends ZfcUser\Controller\UserController { public function indexAction() { /* my code */ } public function registerAction() { /* my code */ } } I add the following in my custom Module's module.config.php : // some more config 'controllers' => array( 'invokables' => array( 'MyModule\Controller

Zend Framework2 using Zfcuser & Bjyauthorize routing

只愿长相守 提交于 2019-12-11 20:34:37
问题 I'm a beginer zend framework programmer. I did use ZfcUser for authentification and Bjyauthorize for authorization. I have to type of users : normal users and administrator . So what i want to do is to route the user to page A and admin to page B after authentification . In the Zfcuser configuation file there not this possibility we have just this line 'logout_redirect_route' => 'zfcuser/login', how can do specify a diffrent route for my differents users? 回答1: To me your problem has nothing

Zend Framework 2 - ZFCUser action whitelisting does not work for rerouting

夙愿已清 提交于 2019-12-11 13:14:28
问题 I'm using this function for whitelisting a few actions from the ZFCUser login. Everything works great unless I redirect to one of these whitelisted pages. For example I have the myFormAction which reroutes in case of an invalid form to itself or to a successAction . The problem is now that after clicking the button in any of these cases I end up seeing the ZFCUser login. When I go to one of these pages via URL or link there the first time, it works. Here is my code for the two cases in

ZFCUser and bjyauthorize - How to leave out authorization for landing page

雨燕双飞 提交于 2019-12-11 08:37:53
问题 I'm building a closed website which has a landing page for everyone. I'm using ZfcUser and BjyAuthorize. Everything works now but I wonder how I can exclude my Application's Application\Controller\Index::index action. In my module.bjyauthorize.global.php I told my action to require no authentication: 'BjyAuthorize\Guard\Controller' => array( array( 'controller' => 'Application\Controller\Index', 'action' => 'index', 'roles' => array() ), // ... But still I get forwarded to the ZFCUser login

composer.json for bjy-authorize, zfcUser and zfc-user-doctrine-orm in ZF2

北战南征 提交于 2019-12-11 06:59:50
问题 i am trying to use bjy-authorize, zfcUser and zfc-user-doctrine-orm in ZF2 using the composer. But i always get an error, when i call composer.phar update. the composer.json looks as follows: { "name": "zendframework/skeleton-application", "description": "Skeleton Application for ZF2", "license": "BSD-3-Clause", "keywords": [ "framework", "zf2" ], "homepage": "http://framework.zend.com/", "minimum-stability": "alpha", "require": { "php": ">=5.3.3", "zendframework/zendframework": "2.*",