41 lines
959 B
PHP
41 lines
959 B
PHP
|
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||
|
|
||
|
/**
|
||
|
* Default ORM profile for Authentication Accounts
|
||
|
*
|
||
|
* @package lnApp
|
||
|
* @category Models
|
||
|
* @author Deon George
|
||
|
* @copyright (c) 2014 Deon George
|
||
|
* @license http://dev.leenooks.net/license.html
|
||
|
*/
|
||
|
abstract class lnApp_Model_Auth_UserDefault extends Model_Auth_User {
|
||
|
// Validation rules
|
||
|
public function rules() {
|
||
|
return array(
|
||
|
'email' => array(
|
||
|
array('not_empty'),
|
||
|
array('min_length', array(':value', 4)),
|
||
|
array('max_length', array(':value', 127)),
|
||
|
array('email'),
|
||
|
),
|
||
|
);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Complete our login
|
||
|
*
|
||
|
* For some database logins, we may not want to record the user last login
|
||
|
* details in the repository, so we just override that parent function
|
||
|
* here.
|
||
|
*
|
||
|
* We can also do some other post-login actions here.
|
||
|
*/
|
||
|
public function complete_login() {
|
||
|
return $this->log('Logged In');
|
||
|
}
|
||
|
|
||
|
abstract public function isAdmin();
|
||
|
}
|
||
|
?>
|