/users/change_account.php
http://showslow.googlecode.com/ · PHP · 24 lines · 20 code · 4 blank · 0 comment · 3 complexity · 7d03fb4fb02fccab9ca38d5a10842f26 MD5 · raw file
- <?php
- require_once(dirname(__FILE__).'/config.php');
- require_once(dirname(__FILE__).'/User.php');
- require_once(dirname(__FILE__).'/Account.php');
- $user = User::require_login();
- if (array_key_exists('account', $_GET)) {
- $account = Account::getByID($_GET['account']);
- if (!is_null($account))
- {
- $account->setAsCurrent($user);
- }
- }
- if (array_key_exists('return', $_GET)) {
- $return_to = $_GET['return'];
- }
- else
- {
- $return_to = UserConfig::$USERSROOTURL.'/manage_account.php';
- }
- header('Location: '.$return_to);