diff options
author | Malf Furious <m@lfurio.us> | 2017-02-07 00:20:03 -0500 |
---|---|---|
committer | Malf Furious <m@lfurio.us> | 2017-02-07 00:20:03 -0500 |
commit | f8db4aae02465dabaf7907f5e821414eeeea14bf (patch) | |
tree | 8f81bfc318c59446454e7aa3b2dfc99afb6efecd /app/class/user.class.php | |
parent | 861c98387001f99fe0e178d8202d2c3ec40538f0 (diff) | |
download | scrott-f8db4aae02465dabaf7907f5e821414eeeea14bf.tar.gz scrott-f8db4aae02465dabaf7907f5e821414eeeea14bf.zip |
Add function expectType() to table class
protected function exceptType added for use by subclasses to assert that
the database object loaded is the correct type and to protect against
cases like EG: passing the GUID for a group to new user(...); If a
problem is detected, throw an exception.
Diffstat (limited to 'app/class/user.class.php')
-rw-r--r-- | app/class/user.class.php | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/class/user.class.php b/app/class/user.class.php index 45fa5a5..7defa8f 100644 --- a/app/class/user.class.php +++ b/app/class/user.class.php @@ -38,6 +38,7 @@ class user extends agent ); parent::__construct($guid); + $this->expectType("user"); } /* |