PHP Class UserRoleModel, huge

This class contains everything that is related to up- and downgrading accounts.
Show file Open project: panique/huge Class Usage Examples

Public Methods

Method Description
changeUserRole ( $type ) : boolean Upgrades / downgrades the user's account. Currently it's just the field user_account_type in the database that can be 1 or 2 (maybe "basic" or "premium"). Put some more complex stuff in here, maybe a pay-process or whatever you like.
saveRoleToDatabase ( $type ) : boolean Writes the new account type marker to the database and to the session

Method Details

changeUserRole() public static method

Upgrades / downgrades the user's account. Currently it's just the field user_account_type in the database that can be 1 or 2 (maybe "basic" or "premium"). Put some more complex stuff in here, maybe a pay-process or whatever you like.
public static changeUserRole ( $type ) : boolean
$type
return boolean

saveRoleToDatabase() public static method

Writes the new account type marker to the database and to the session
public static saveRoleToDatabase ( $type ) : boolean
$type
return boolean