Login/Activation tested
This commit is contained in:
@@ -50,7 +50,7 @@ abstract class lnApp_Model_Account extends Model_Auth_UserDefault {
|
||||
}
|
||||
|
||||
public function activated() {
|
||||
return $this->has_any('group',ORM::factory('Group',array('name'=>'Registered Users'))->list_childgrps(TRUE));
|
||||
return $this->verified;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -68,6 +68,9 @@ abstract class lnApp_Model_Account extends Model_Auth_UserDefault {
|
||||
}
|
||||
|
||||
public function log($message) {
|
||||
if (! class_exists('Model_Account_Log'))
|
||||
return TRUE;
|
||||
|
||||
// Log a message for this account
|
||||
$alo = ORM::factory('Account_Log');
|
||||
$alo->account_id = $this->id;
|
||||
@@ -110,6 +113,13 @@ abstract class lnApp_Model_Account extends Model_Auth_UserDefault {
|
||||
return trim(sprintf('%s %s',$this->first_name,$this->last_name));
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a token valid for this user
|
||||
*/
|
||||
public function token($token_expire,$module,$method,$uses) {
|
||||
return $this->id.':'.md5(sprintf('%s-%s',$this->accnum(),$this->date_last));
|
||||
}
|
||||
|
||||
/**
|
||||
* Search for accounts matching a term
|
||||
*/
|
||||
|
Reference in New Issue
Block a user