atans / atansuser Goto Github PK
View Code? Open in Web Editor NEWA user registration, authentication and role-based access control module for Zend Framework 2
A user registration, authentication and role-based access control module for Zend Framework 2
There is a bug in UserAddForm.php:
use AtansLogger\Options\ModuleOptions;
should probably be:
use AtansUser\Options\ModuleOptions;
I am using the latest (dev-master) doctrine-module and when saving user from UserAdminController I am getting validation exception with message "Expected context to contain id". It comes from .vendor/doctrine/doctrine-module/src/DoctrineModule/Validator/UniqueObject.php:166
I fixed it in UserAddForm.php getInputFilterSpecification() by adding option 'use_context' => true to DoctrineModule\Validator\UniqueObject validator for username and email. To use context now needs to be explicitly set by this option.
Additionally there is a misspelling in "'requred' => true"
......
'username' => array(
'required' => true,
'filters' => array(
array('name' => 'StripTags'),
array('name' => 'StringTrim'),
),
'validators' => array(
array(
'name' => 'DoctrineModule\Validator\UniqueObject',
'options' => array(
'use_context' => true,
'object_manager' => $objectManager,
'object_repository' => $objectManager->getRepository($this->entities['User']),
'fields' => array('username'),
'messages' => array(
UniqueObject::ERROR_OBJECT_NOT_UNIQUE => 'The username already taken',
),
),
),
),
),
'email' => array(
'required' => true,
'validators' => array(
array('name' => 'EmailAddress'),
array(
'name' => 'DoctrineModule\Validator\UniqueObject',
'options' => array(
'use_context' => true,
'object_manager' => $objectManager,
'object_repository' => $objectManager->getRepository($this->entities['User']),
'fields' => array('email'),
'messages' => array(
UniqueObject::ERROR_OBJECT_NOT_UNIQUE => 'The email already taken',
),
),
),
),
),
....
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.