Adding commit message to Build

This commit is contained in:
Dan Cryer 2014-02-25 16:43:06 +00:00
commit eaec52b525
14 changed files with 189 additions and 46 deletions

View file

@ -6,7 +6,7 @@
namespace PHPCI\Model\Base;
use b8\Model;
use PHPCI\Model;
use b8\Store\Factory;
/**
@ -82,14 +82,17 @@ class UserBase extends Model
'email' => array(
'type' => 'varchar',
'length' => 250,
'default' => null,
),
'hash' => array(
'type' => 'varchar',
'length' => 250,
'default' => null,
),
'is_admin' => array(
'type' => 'tinyint',
'length' => 1,
'default' => null,
),
'name' => array(
'type' => 'varchar',
@ -270,4 +273,26 @@ class UserBase extends Model
$this->_setModified('name');
}
public static function getByPrimaryKey($value, $useConnection = 'read')
{
return Factory::getStore('User', 'PHPCI')->getByPrimaryKey($value, $useConnection);
}
public static function getById($value, $useConnection = 'read')
{
return Factory::getStore('User', 'PHPCI')->getById($value, $useConnection);
}
public static function getByEmail($value, $useConnection = 'read')
{
return Factory::getStore('User', 'PHPCI')->getByEmail($value, $useConnection);
}
}