mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2024-09-20 14:56:23 +08:00
allow set default attribute in the getAttribute
This commit is contained in:
parent
df5e03a827
commit
d11cd83089
|
@ -123,7 +123,7 @@ class User
|
|||
return 0;
|
||||
}
|
||||
|
||||
public static function getAttribute($name, $id = 0)
|
||||
public static function getAttribute($name, $id = 0, $default = '')
|
||||
{
|
||||
if (!$id) {
|
||||
$id = User::getID();
|
||||
|
@ -135,7 +135,7 @@ class User
|
|||
if ($f) {
|
||||
return $f['field_value'];
|
||||
}
|
||||
return '';
|
||||
return $default;
|
||||
}
|
||||
|
||||
public static function getAttributes($endWith, $id = 0)
|
||||
|
|
Loading…
Reference in a new issue