namespace Model;
class Auth_User extends \Auth\Model\Auth_User
{
protected static $_observers = array(
'Orm\\Observer_CreatedAt' =--> array(
'events' => array('before_insert'),
'property' => 'created_at',
'mysql_timestamp' => false
),
'Orm\\Observer_UpdatedAt' => array(
'events' => array('before_update'),
'property' => 'updated_at',
'mysql_timestamp' => false
),
'Orm\\Observer_Typing' => array(
'events' => array('after_load', 'before_save', 'after_save')
),
'Orm\\Observer_Self' => array(
'events' => array('before_insert', 'before_update'),
'property' => 'user_id'
),
'Orm\\Observer_Slug' => array(
'events' => array('before_insert'),
'source' => 'username',
'property' => 'slug'
),
);
}
Autoloader::add_classes(array(
'Model\\Auth_User' => APPPATH . 'classes/model/auth/user.php',
));
<?phpand in the bootstrap:
namespace Model;
class Auth_User extends \Auth\Model\Auth_User
{
public static function _init()
{
die('loaded');
}
}
Autoloader::add_classes(array(
'Model\Auth_User' => APPPATH.'classes/model/auth/user.php',
));
<?php
namespace Model;
class Auth_User extends \Auth\Model\Auth_User
{
public static function _init()
{
static::$_observers['Orm\\Observer_Slug'] = array(
'events' => array('before_insert'),
'source' => 'username',
'property' => 'slug'
);
parent::_init();
}
}
It looks like you're new here. If you want to get involved, click one of these buttons!