Updated Login to use lnapp, and minor update to Invoice

This commit is contained in:
Deon George
2016-08-17 22:30:12 +10:00
parent 07de13f678
commit c1cc6b6f69
10 changed files with 107 additions and 148 deletions

View File

@@ -127,6 +127,18 @@ class Model_Account extends lnApp_Model_Account {
return $sk.sprintf('%s %s',$this->last_name,$this->first_name);
}
/**
* Generate a token for non-login authorised functinos
*/
public function token($token_expire,$module,$method,$uses) {
return ORM::factory('Module_Method_Token')
->method(array($module,$method))
->account($this)
->uses($uses)
->expire(time()+$token_expire*60)
->generate();
}
/**
* Search for accounts matching a term
*/