Permalink
Browse files

BaseEntity now simply implements IModel. Fixes #1

  • Loading branch information...
1 parent 851b364 commit 18c4c8f1b94fdb9710f372d81fe089e0bde5db63 @mariano committed Mar 1, 2012
Showing with 5 additions and 2 deletions.
  1. +4 −1 extensions/adapter/security/auth/Form.php
  2. +1 −1 models/BaseEntity.php
View
5 extensions/adapter/security/auth/Form.php
@@ -81,7 +81,10 @@ public function __construct(array $config = array()) {
}
$reflection = new \ReflectionClass($config['model']);
- if (!$reflection->implementsInterface('li3_doctrine2\models\IUser')) {
+ if (
+ !$reflection->implementsInterface('li3_doctrine2\models\IModel') &&
+ !$reflection->implementsInterface('li3_doctrine2\models\IUser')
+ ) {
throw new ConfigException("The model {$config['model']} must implement IUser");
}
View
2 models/BaseEntity.php
@@ -17,7 +17,7 @@
* This class can be used as the base class of your doctrine models, to allow
* for lithium validation to work on doctrine models.
*/
-abstract class BaseEntity extends \lithium\data\Entity implements IModel, IUser {
+abstract class BaseEntity extends \lithium\data\Entity implements IModel {
/**
* Criteria for data validation.
*

0 comments on commit 18c4c8f

Please sign in to comment.