Removed redundant functions, some Standardisation work
This commit is contained in:
@@ -44,21 +44,7 @@ class Model_Account extends lnApp_Model_Account {
|
||||
|
||||
/** REQUIRED ABSTRACT METHODS **/
|
||||
|
||||
/**
|
||||
* Returns the company name if it exists, otherwise the persons name
|
||||
*/
|
||||
public function name($variable=NULL) {
|
||||
return $this->isCompany() ? $this->company : $this->namesub();
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns the persons name
|
||||
*/
|
||||
public function namesub($variable=NULL) {
|
||||
return trim(sprintf('%s %s',$this->first_name,$this->last_name));
|
||||
}
|
||||
|
||||
/** OTHER METHODS **/
|
||||
/** LOCAL METHODS **/
|
||||
|
||||
public function activated() {
|
||||
return $this->has('group');
|
||||
@@ -115,6 +101,20 @@ class Model_Account extends lnApp_Model_Account {
|
||||
return $this->RTM->loaded();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the company name if it exists, otherwise the persons name
|
||||
*/
|
||||
public function name($variable=NULL) {
|
||||
return $this->isCompany() ? $this->company : $this->namesub();
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns the persons name
|
||||
*/
|
||||
public function namesub($variable=NULL) {
|
||||
return trim(sprintf('%s %s',$this->first_name,$this->last_name));
|
||||
}
|
||||
|
||||
/**
|
||||
* The key we use to sort entries of this model type
|
||||
*/
|
||||
|
Reference in New Issue
Block a user