Пример #1
0
}
if ($info->private == false && $gSession->isValid()) {
    $info = $gRouteInfo['home'];
}
if ($_GET['go'] == 'new_account_submit') {
    $user = new UserEntity();
    $user->createNewAccount();
} else {
    if ($_GET['go'] == 'reset_password_submit') {
        $user = new UserEntity();
        $user->resetPassword();
    } else {
        if ($_GET['go'] == 'login_submit') {
            $username = isset($_POST['username']) ? $_POST['username'] : '';
            $password = isset($_POST['password']) ? $_POST['password'] : '';
            if ($gSession->validateLogin($username, $password)) {
                $info = $gRouteInfo['home'];
            } else {
                $info = $gRouteInfo['login'];
            }
        } else {
            if ('profile_change_submit' == $_GET['go']) {
                $user = new UserEntity();
                $gSession->reloadSession($user->changeProfile($gSession->userInfo['email']));
            }
        }
    }
}
//print_r($gSession->userInfo);// "logout happening...";
?>