summaryrefslogtreecommitdiffstats
path: root/application/models/Person.php
diff options
context:
space:
mode:
authorBjörn Geiger2011-04-13 15:05:53 +0200
committerBjörn Geiger2011-04-13 15:05:53 +0200
commit63b4fb51d481e4376f60f188c171d57970abbd46 (patch)
tree0c5ef7afcae61c36d1b0cb2657598bf2d381b5af /application/models/Person.php
parentZweiter Teil der Rechte in Group Controller (diff)
downloadpbs2-63b4fb51d481e4376f60f188c171d57970abbd46.tar.gz
pbs2-63b4fb51d481e4376f60f188c171d57970abbd46.tar.xz
pbs2-63b4fb51d481e4376f60f188c171d57970abbd46.zip
Suspend und Resume Account
Diffstat (limited to 'application/models/Person.php')
-rw-r--r--application/models/Person.php60
1 files changed, 35 insertions, 25 deletions
diff --git a/application/models/Person.php b/application/models/Person.php
index aea348d..6a591cf 100644
--- a/application/models/Person.php
+++ b/application/models/Person.php
@@ -16,6 +16,7 @@ class Application_Model_Person
protected $_login;
protected $_password;
protected $_password_salt;
+ protected $_suspended;
public function __construct(array $options = null)
{
@@ -183,39 +184,48 @@ class Application_Model_Person
{
return $this->_password_salt;
}
- /**
- * Returns current data as associative array using ReflectionClass
- *
- * @return array Returns associative array containing model data
+ public function getSuspended()
+ {
+ return $this->_suspended;
+ }
+ public function setSuspended($_suspended)
+ {
+ $this->_suspended = $_suspended;
+ return $this;
+ }
+ /**
+ * Returns current data as associative array using ReflectionClass
+ *
+ * @return array Returns associative array containing model data
* If "get"-method not available (our primary keys) the function getID() is called
- */
- public function toArray()
- {
- $reflectionClass = new ReflectionClass($this);
- $properties = $reflectionClass->getProperties();
- $result = array();
- foreach ($properties as $property) {
- $key = $property->name;
- if (substr($key, 0, 1) != '_' && $this->$key !== null) {
- $method = 'get' . ucfirst($key);
- if ($reflectionClass->hasMethod($method)) {
- $result[$key] = $this->$method();
- } else {
- $result[$key] = $this->$key;
- }
- }
+ */
+ public function toArray()
+ {
+ $reflectionClass = new ReflectionClass($this);
+ $properties = $reflectionClass->getProperties();
+ $result = array();
+ foreach ($properties as $property) {
+ $key = $property->name;
+ if (substr($key, 0, 1) != '_' && $this->$key !== null) {
+ $method = 'get' . ucfirst($key);
+ if ($reflectionClass->hasMethod($method)) {
+ $result[$key] = $this->$method();
+ } else {
+ $result[$key] = $this->$key;
+ }
+ }
elseif(substr($key, 0, 1) == '_' && $this->$key !== null) {
$key = substr($key, 1);
- $method = 'get' . ucfirst($key);
+ $method = 'get' . ucfirst($key);
if ($reflectionClass->hasMethod($method)) {
$result[$key] = $this->$method();
}else{
$result[$key] = $this->getID();
}
-
+
}
- }
- return $result;
- }
+ }
+ return $result;
+ }
}