PHP Класс UserRoleModel, huge

This class contains everything that is related to up- and downgrading accounts.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Описание методов

changeUserRole() публичный статический Метод

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
Результат boolean

saveRoleToDatabase() публичный статический Метод

Writes the new account type marker to the database and to the session
public static saveRoleToDatabase ( $type ) : boolean
$type
Результат boolean