protected function resolveUser($id)
	{
		if (!is_numeric($id))
		{
			if (strstr($id, '@'))
			{
				$user = User::oneByEmail($id);
			}
			else
			{
				$user = User::oneByUsername($id);
			}
		}
		else
		{
			$user = User::oneOrNew($id);
		}

		return $user;
	}
protected function resolveUser($id)
	{
		if (!is_numeric($id))
		{
			if (strstr($id, '@'))
			{
				$user = User::oneByEmail($id);
			}
			else
			{
				$user = User::oneByUsername($id);
			}
		}
		else
		{
			$user = User::oneOrNew($id);
		}

		return $user;
	}
protected function resolveUser ( $ id ) { if ( ! is_numeric ( $ id ) ) { if ( strstr ( $ id , '@' ) ) { $ user = User :: oneByEmail ( $ id ) ; } else { $ user = User :: oneByUsername ( $ id ) ; } } else { $ user = User :: oneOrNew ( $ id ) ; } return $ user ; }
Create a new user instance.

@param   mixed  $id
@return  object
Create a new user instance .