User Data

api.user_data is the class that the the user's data is stored in ( it needs the program to be initialized and the user to be logged in ) :


user_data.username is the username of the person that logged in


user_data.email is the email of the person that logged in


user_data.expires is the expiry date (saved as DateTime[c#] or std::tm[c++]) of the person that logged in


user_data.rank is the rank of the person that logged in


user_data.var is the custom variable of the person that logged in ( can be set on the panel's user page )



Code-Example

    class Program {
        public static api auth_instance = new api("program version", "program key", "api key");

        static void Main(string[] args) {
            auth_instance.init();

            if (auth_instance.login("user", "pass")) { // if the user could login successfully
                Console.WriteLine(auth_instance.user_data.username); //writes the username
                Console.WriteLine(auth_instance.user_data.email); //writes the email
                Console.WriteLine(auth_instance.user_data.expires.ToString()); //writes the expiry date-time
                Console.WriteLine(auth_instance.user_data.var); //writes the user variable

                if (auth_instance.user_data.rank == 1) //check if the user rank equals to 1
                    Console.WriteLine("your rank is one");
                else
                    Console.WriteLine("your rank is else than one");
            }
        }
    }