| 1 | <?php |
||
| 8 | class UserRoleModel |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Upgrades / downgrades the user's account. Currently it's just the field user_account_type in the database that |
||
| 12 | * can be 1 or 2 (maybe "basic" or "premium"). Put some more complex stuff in here, maybe a pay-process or whatever |
||
| 13 | * you like. |
||
| 14 | * |
||
| 15 | * @param $type |
||
| 16 | * |
||
| 17 | * @return bool |
||
| 18 | */ |
||
| 19 | public static function changeUserRole($type) |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Writes the new account type marker to the database and to the session |
||
| 37 | * |
||
| 38 | * @param $type |
||
| 39 | * |
||
| 40 | * @return bool |
||
| 41 | */ |
||
| 42 | public static function saveRoleToDatabase($type) |
||
| 65 | } |
||
| 66 |