diff options
Diffstat (limited to 'demos/time-tracker/protected/APP_CODE/TimeTrackerUser.php')
-rw-r--r-- | demos/time-tracker/protected/APP_CODE/TimeTrackerUser.php | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/demos/time-tracker/protected/APP_CODE/TimeTrackerUser.php b/demos/time-tracker/protected/APP_CODE/TimeTrackerUser.php new file mode 100644 index 00000000..4b6987bd --- /dev/null +++ b/demos/time-tracker/protected/APP_CODE/TimeTrackerUser.php @@ -0,0 +1,31 @@ +<?php
+
+Prado::using('System.Security.TUser');
+Prado::using('System.Security.TUserManager');
+
+class TimeTrackerUser extends TUser
+{
+ private $_ID;
+
+ public function __construct()
+ {
+ parent::__construct(new TUserManager());
+ }
+
+ public function getID(){ return $this->_ID; }
+ public function setID($value)
+ {
+ if(is_null($this->_ID))
+ $this->_ID = $value;
+ else
+ throw new TimeTrackerUserException(
+ 'timetracker_user_readonly_id');
+ }
+}
+
+class TimeTrackerUserException extends TimeTrackerException
+{
+
+}
+
+?>
\ No newline at end of file |