PHP Class Model_A1_User_Jelly
public static function initialize(Jelly_Meta $meta)
{
$meta->table('user')
->fields(array(
'logins' => new Field_Integer,
'token' => new Field_String(),
));
parent::initialize($meta);
}
}
------------------------------
APPATH/classes/controller/user.php:
class Controller_Frontend_User extends Controller_Frontend_Template {
public function action_signup()
{
...
try
{
$user = Jelly::factory('user', array(
'username' => 'user',
'password' => 'bI$hkEk*2bj',
'password' => 'bI$hkEk*2bj',
))->save();
}
catch(Validate_Exception $e)
{
catch validate errors
}
...
}
Mostra file
Open project: wouterrr/a1
Public Methods
Method Details
hash_password()
public static method
Hash callback using the A1 library
initialize()
public static method
public static initialize ( Jelly_Meta $meta ) |
$meta |
Jelly_Meta |
|