From bcc8bbc088c098aa22c3984b435bbd62b144369f Mon Sep 17 00:00:00 2001 From: Evan Coury Date: Tue, 1 Nov 2011 21:07:17 -0700 Subject: [PATCH] Initial commit of user module --- Module.php | 34 ++++++++++++++++++++ README.md | 20 ++++++++++++ autoload_classmap.php | 2 ++ autoload_function.php | 12 +++++++ autoload_register.php | 2 ++ configs/module.config.php | 20 ++++++++++++ src/EdpUser/Entity/User.php | 63 +++++++++++++++++++++++++++++++++++++ 7 files changed, 153 insertions(+) create mode 100644 Module.php create mode 100644 README.md create mode 100644 autoload_classmap.php create mode 100644 autoload_function.php create mode 100644 autoload_register.php create mode 100644 configs/module.config.php create mode 100644 src/EdpUser/Entity/User.php diff --git a/Module.php b/Module.php new file mode 100644 index 0000000..5343f07 --- /dev/null +++ b/Module.php @@ -0,0 +1,34 @@ +initAutoloader(); + } + + protected function initAutoloader() + { + AutoloaderFactory::factory(array( + 'Zend\Loader\ClassMapAutoloader' => array( + __DIR__ . '/autoload_classmap.php', + ), + 'Zend\Loader\StandardAutoloader' => array( + 'namespaces' => array( + __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, + ), + ), + )); + } + + public function getConfig($env = null) + { + return new Config(include __DIR__ . '/configs/module.config.php'); + } +} diff --git a/README.md b/README.md new file mode 100644 index 0000000..68c74c9 --- /dev/null +++ b/README.md @@ -0,0 +1,20 @@ +EdpUser +======= +Version 0.0.1 Created by Evan Coury + +Introduction +------------ + +EdpUser is a ZF2 module which utilizes Doctrine2. It provides the foundations +for adding user authentication and registration to your ZF2 site. It is built to +be very simple and easily to extend. + +Features +-------- + +* Authenticate via username, email, or both (can opt out of the concept of + username and use strictly email) +* E-mail address verification (optional) +* Forgot Password +* User Registration +* Robust event system to allow for extending diff --git a/autoload_classmap.php b/autoload_classmap.php new file mode 100644 index 0000000..d266508 --- /dev/null +++ b/autoload_classmap.php @@ -0,0 +1,2 @@ + array( + 'instance' => array( + 'doctrine-container' => array( + 'parameters' => array( + 'em' => array( + 'default' => array( + 'driver' => array( + 'paths' => array( + 'EdpUser' => __DIR__ . '/../src/EdpUser/Entity', + ), + ), + ), + ), + ), + ), + ), + ), +); diff --git a/src/EdpUser/Entity/User.php b/src/EdpUser/Entity/User.php new file mode 100644 index 0000000..d2d66a6 --- /dev/null +++ b/src/EdpUser/Entity/User.php @@ -0,0 +1,63 @@ +