#[solved] account.create gives admin label by default

1 messages · Page 1 of 1 (latest)

neon jackal
#

whenever i register a new account and go to the auth tab to check it out, i see that all these accounts are given the "admin" label automatically, i need that to stop, how? i dont really know.

heres the code

const handleRegister = () => {
        const promReg = account.create(username.toLowerCase(), email, password, username)
        promReg.then(function (response) {
            console.log(`Registered!\nWelcome ${response.userId}`); // Success
            databases.createDocument(processEnv.VITE_REACT_DATABASE, processEnv.VITE_REACT_USERS, ID.unique(), {
                username: username,
                followers: [],
                about: '',
                userId: username.toLowerCase(),
                pfp: '',
                badges: []
            })
        }, function (error) {
            console.log(error); // Failure
        });
    }
vale lava
#

Get admin

neon jackal
#

what do you mean?

warm forge
neon jackal
#

i dont really know where its setting labels from honestly

#

i see nothing

#

maybe im missing something on the appwrite webpage?

#

plus this didnt happen the first times that i remember

warm forge
neon jackal
#

nnope

pliant junco
neon jackal
#

sure ill send in a few minutes

neon jackal
#

school issues

#

ill show you now

#

@pliant junco this is the code right here

#

and this is what happens when i press the button

#

well now for some reason the admin label isnt added

#

hm.

#

thats interesting

#

though now what im getting is undefined for some reason

#

and the fact that it actually got a response bugs me because it means that it actually accepted the request but the response is not working

#

i have changed some stuff right here but now appwrite says that im missing 'userid'

#

and userid is already there

#

response.name.toLowerCase() is the ID of the user

#

noobie error

warm forge
neon jackal
#

yes

#

just saw

#

tho the label stuff

#

thats something i will never understand

#

why or how it happened

#

because i changed nothing

warm forge
neon jackal
#

yup

#

no idea

#

ill mark it as fixed