Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit bcc8bbc
Showing
7 changed files
with
153 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
namespace EdpUser; | ||
|
||
use Zend\Module\Manager, | ||
Zend\Config\Config, | ||
Zend\Loader\AutoloaderFactory; | ||
|
||
class Module | ||
{ | ||
public function init(Manager $moduleManager) | ||
{ | ||
$this->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'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?php | ||
return array(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
return function ($class) { | ||
static $map; | ||
if (!$map) { | ||
$map = include __DIR__ . '/autoload_classmap.php'; | ||
} | ||
|
||
if (!isset($map[$class])) { | ||
return false; | ||
} | ||
return include $map[$class]; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?php | ||
spl_autoload_register(include __DIR__ . '/autoload_function.php'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
return array( | ||
'di' => array( | ||
'instance' => array( | ||
'doctrine-container' => array( | ||
'parameters' => array( | ||
'em' => array( | ||
'default' => array( | ||
'driver' => array( | ||
'paths' => array( | ||
'EdpUser' => __DIR__ . '/../src/EdpUser/Entity', | ||
), | ||
), | ||
), | ||
), | ||
), | ||
), | ||
), | ||
), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?php | ||
|
||
namespace EdpUser\Entity; | ||
|
||
use Doctrine\ORM\Mapping as ORM; | ||
|
||
/** | ||
* @ORM\Entity | ||
*/ | ||
class User | ||
{ | ||
/** | ||
* @ORM\Id | ||
* @ORM\Column(type="integer") | ||
* @ORM\GeneratedValue(strategy="AUTO") | ||
*/ | ||
private $id; | ||
|
||
/** | ||
* @ORM\Column(type="string", unique=true) | ||
*/ | ||
private $username; | ||
|
||
/** | ||
* @ORM\Column(type="string", unique=true) | ||
*/ | ||
private $email; | ||
|
||
/** | ||
* @ORM\Column(type="string", length=50) | ||
*/ | ||
private $display_name; | ||
|
||
/** | ||
* @ORM\Column(type="string", length=128) | ||
*/ | ||
private $password; | ||
|
||
/** | ||
* @ORM\Column(type="string", length=16) | ||
*/ | ||
private $salt; | ||
|
||
/** | ||
* @ORM\Column(type="datetime") | ||
*/ | ||
private $last_login; | ||
|
||
/** | ||
* @ORM\Column(type="integer") | ||
*/ | ||
private $last_ip; | ||
|
||
/** | ||
* @ORM\Column(type="datetime") | ||
*/ | ||
private $register_time; | ||
|
||
/** | ||
* @ORM\Column(type="integer") | ||
*/ | ||
private $register_ip; | ||
} |