| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public static function changeUserRole($type) |
||
| 20 | { |
||
| 21 | if (!$type) { |
||
| 22 | return false; |
||
| 23 | } |
||
| 24 | |||
| 25 | // save new role to database |
||
| 26 | if (self::saveRoleToDatabase($type)) { |
||
| 27 | Session::add('feedback_positive', Text::get('FEEDBACK_ACCOUNT_TYPE_CHANGE_SUCCESSFUL')); |
||
| 28 | return true; |
||
| 29 | } else { |
||
| 30 | Session::add('feedback_negative', Text::get('FEEDBACK_ACCOUNT_TYPE_CHANGE_FAILED')); |
||
| 31 | return false; |
||
| 32 | } |
||
| 33 | } |
||
| 34 | |||
| 66 |