function add($userName, $password, $salt = null)
    {
        if ($salt !== null) {
            $key = \Thruway\Common\Utils::getDerivedKey($password, $salt);
        } else {
            $key = $password;
        }

        $this->users[$userName] = ["authid" => $userName, "key" => $key, "salt" => $salt];
    }
function add($userName, $password, $salt = null)
    {
        if ($salt !== null) {
            $key = \Thruway\Common\Utils::getDerivedKey($password, $salt);
        } else {
            $key = $password;
        }

        $this->users[$userName] = ["authid" => $userName, "key" => $key, "salt" => $salt];
    }
function add ( $ userName , $ password , $ salt = null ) { if ( $ salt !== null ) { $ key = \ Thruway \ Common \ Utils :: getDerivedKey ( $ password , $ salt ) ; } else { $ key = $ password ; } $ this -> users [ $ userName ] = [ "authid" => $ userName , "key" => $ key , "salt" => $ salt ] ; }
Add new user

@param string $userName
@param string $password
@param string $salt
Add new user