summaryrefslogtreecommitdiff
path: root/public/app/extends/App_user.php
diff options
context:
space:
mode:
Diffstat (limited to 'public/app/extends/App_user.php')
-rw-r--r--public/app/extends/App_user.php63
1 files changed, 29 insertions, 34 deletions
diff --git a/public/app/extends/App_user.php b/public/app/extends/App_user.php
index 9aed489..6e93969 100644
--- a/public/app/extends/App_user.php
+++ b/public/app/extends/App_user.php
@@ -12,14 +12,6 @@ use Registry;
* this way it specializes the UserManagement
* according to this app's special rules
*
- * Add privileges concept
- * ---
- * A Class_user has privileges (which are deferent than Roles)
- * In fact, privileges extend the authorization requirements for users
- *
- * Authorized content is marked with some 'minimum Privilege'
- * So the content is available to the READER(s) that have certain Privileges
- *
*/
class App_user extends User
{
@@ -29,18 +21,20 @@ class App_user extends User
*/
private $id;
- /** user privileges
- * @var array
+ /** sex (gender)
+ * @var int (1 = male, 2 = female )
*/
- private $privileges = [];
+ private $sex;
/** user name
- * @var string
+ * @var string : first_name +' '+ last_name
*/
private $name;
+
+
/** SETTERS AND GETTERS
- * for id, name, privileges attributes
+ * for id, name, attributes
* -------------------------------------------------------------------------
*/
@@ -68,54 +62,55 @@ class App_user extends User
}
- // name
+ // sex
// --- -- -- - - -
- /** getName
+ /** getSex()
* @return int
*/
- public function getName(): string
+ public function getSex(): int
{
- return $this->name;
+ return $this->sex;
}
- /** setName()
+
+ /** setSex()
*
- * @param string : user's full name
+ * @param int : sex (id)
*
* @return User
*/
- public function setName(string $name): self
+ public function setSex(int $sex): self
{
- $this->name = $name;
+ $this->sex = $sex;
return $this;
}
-
- // privileges
+
+
+ // name
// --- -- -- - - -
- /** getPrivileges
- *
- * @return privileges (array)
+ /** getName
+ * @return string
*/
- public function getPrivileges(): array
+ public function getName(): string
{
- return $this->privileges;
+ return $this->name;
}
-
- /** setPrivileges()
+ /** setFirstName()
*
- * @param array $privileges
+ * @param string : user's full name
*
* @return User
*/
- public function setPrivileges(array $privileges): self
+ public function setName(string $name): self
{
- $this->privileges = $privileges;
+ $this->name = $name;
return $this;
}
-
+
+
} \ No newline at end of file