AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Store (https://forums.alliedmods.net/forumdisplay.php?f=157)
-   -   What is 'auth' and how does it relate to SteamID/Name? (https://forums.alliedmods.net/showthread.php?t=232880)

crayz 01-06-2014 07:01

What is 'auth' and how does it relate to SteamID/Name?
 
Is there any relation between a user's auth code and their Steam ID or name? Perhaps a user's IP address? Is the auth generated by the store plugin itself?

edit: I just discovered this handy snippet:
Code:

    $toks = explode(":", $steamid);
    $odd = (int)$toks[1];
    $halfAID = (int)$toks[2];

    return ($halfAID*2) + $odd;

https://forums.alliedmods.net/showpo...&postcount=234

Which is exactly what I was trying to figure out :-)

alongub 01-07-2014 13:31

Re: What is 'auth' and how does it relate to SteamID/Name?
 
It's the account id

crayz 01-08-2014 10:19

Re: What is 'auth' and how does it relate to SteamID/Name?
 
Quote:

Originally Posted by alongub (Post 2082597)
It's the account id

I was aware of this quickly after looking at the database structure, I saw the store didn't go by the actual steam id, 64 bit, or username, but instead the auth id. So I was seeking how the auth id is related to a steam id, but the snippet in op answered that for me :)

Arrow768 01-08-2014 10:57

Re: What is 'auth' and how does it relate to SteamID/Name?
 
These are the functions I used at the store webpanel:

PHP Code:

    function auth_to_steamid($authid)
    {
        
$steam = array();
        
$steam[0] = "STEAM_0";

        if (
$authid == 0)
        {
            
$steam[1] = 0;
        }
        else
        {
            
$steam[1] = 1;
            
$authid -= 1;
        }
        
$steam[2] = $authid 2;
        return 
$steam[0] . ":" $steam[1] . ":" $steam[2];
    }

    function 
steamid_to_auth($steamid)
    {
        
//from https://forums.alliedmods.net/showpost.php?p=1890083&postcount=234
        
$toks explode(":"$steamid);
        
$odd = (int) $toks[1];
        
$halfAID = (int) $toks[2];

        return (
$halfAID 2) + $odd;
    } 



All times are GMT -4. The time now is 12:43.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.