PageRenderTime 5ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/users/change_account.php

http://showslow.googlecode.com/
PHP | 24 lines | 20 code | 4 blank | 0 comment | 3 complexity | 7d03fb4fb02fccab9ca38d5a10842f26 MD5 | raw file
 1<?php
 2require_once(dirname(__FILE__).'/config.php');
 3require_once(dirname(__FILE__).'/User.php');
 4require_once(dirname(__FILE__).'/Account.php');
 5
 6$user = User::require_login();
 7
 8if (array_key_exists('account', $_GET)) {
 9	$account = Account::getByID($_GET['account']);
10	if (!is_null($account))
11	{
12		$account->setAsCurrent($user);
13	}
14}
15
16if (array_key_exists('return', $_GET)) {
17	$return_to = $_GET['return'];
18}
19else
20{
21	$return_to = UserConfig::$USERSROOTURL.'/manage_account.php';
22}
23
24header('Location: '.$return_to);