diff options
| author | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-05-04 03:02:01 +0300 |
|---|---|---|
| committer | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-05-04 03:02:01 +0300 |
| commit | 63f714d5a78b765c117ebf6bbdfdbd748dd45644 (patch) | |
| tree | 87a4db40e1ff699222ccfdf699a3904d1c665bfc /public/app/extends/App_user.php | |
| parent | 931a93cd7bae092e2752064568cebe407d2bf46e (diff) | |
| download | gyraf1gov-63f714d5a78b765c117ebf6bbdfdbd748dd45644.tar.gz gyraf1gov-63f714d5a78b765c117ebf6bbdfdbd748dd45644.tar.bz2 gyraf1gov-63f714d5a78b765c117ebf6bbdfdbd748dd45644.zip | |
authentication; invitation; activation; base form setup
Diffstat (limited to 'public/app/extends/App_user.php')
| -rw-r--r-- | public/app/extends/App_user.php | 63 |
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 |
