I'm answering this to mark it as answered, but please don't vote me up since I didn't answer it, go to: https://gamedev.stackexchange.com/questions/58616/how-to-know-if-the-player-is-signed-in/58618?noredirect=1#58618 and vote ToddersLegrande answer up.
In XNA there is a SignedInGamer
class with a SignedInGamer.PlayerIndex
member that should tell you just that if you can get a hold of the SignedInGamer
object.
To do that, there is the Gamer.SignedInGamers
static property which contains a collection of SignedInGamer
objects based on the current state of the system. This is from the Microsoft.Xna.Framework.GamerServices
namespace.
With this information you could do something like the following:
//If player 2 is connected
if (GamePad.GetState(PlayerIndex.Two).IsConnected)
{
//If we can't find a signed in gamer with a PlayerIndex of two
if (!Gamer.SignedInGamers.Cast<SignedInGamer>().Any(x => x.PlayerIndex == PlayerIndex.Two))
{
//Your handling code here
}
}