mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-11-21 20:34:57 +09:00
Model_Admin->getStatus() created
Returns admin user status value.
This commit is contained in:
1 parent
08524b0f99
commit
43c8885426
2 files changed
+13
-1
No files matched your search
@@ -24,4 +24,16 @@ class Model_Admin extends \RedBean_SimpleModel
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public function getStatus($status = '')
|
||||
{
|
||||
$statusArray = array(
|
||||
self::STATUS_ACTIVE,
|
||||
self::STATUS_INACTIVE
|
||||
);
|
||||
if (in_array($status, $statusArray)){
|
||||
return strtolower($status);
|
||||
}
|
||||
return self::STATUS_INACTIVE;
|
||||
}
|
||||
}
|
||||
@@ -470,7 +470,7 @@ class Service implements InjectionAwareInterface
|
||||
$model->email = $data['email'];
|
||||
$model->pass = $this->di['password']->hashIt($data['password']);
|
||||
$model->name = $data['name'];
|
||||
$model->status = \Model_Admin::STATUS_ACTIVE;
|
||||
$model->status = $model->getStatus($data['status']);
|
||||
$model->signature = $signature;
|
||||
$model->created_at = date('c');
|
||||
$model->updated_at = date('c');
|
||||
|
||||
Reference in new issue
Block a user