Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Users Profile Icon and name #75

Open
andrewga opened this issue May 8, 2019 · 2 comments
Open

Update Users Profile Icon and name #75

andrewga opened this issue May 8, 2019 · 2 comments

Comments

@andrewga
Copy link

andrewga commented May 8, 2019

Is it possible to update the users profile Icon and username?

@aslanyanhaik
Copy link
Owner

@andrewga I'm planning to add that feature in near future

@StellarKuldeep
Copy link

StellarKuldeep commented Aug 28, 2019

@andrewga & @aslanyanhaik , I have tried below code to update user profile icon & username and it works.

UPDATE

func updateUserDetail(strUpdateName: String, strProfileURL: String) {
        let ref = Firestore.firestore().collection("Users")
        ref.document(UserManager().currentUserID() ?? "").updateData(["name": strUpdateName, "profilePicLink": strProfileURL]) { (err) in
            if let err = err {
                print("Error updating document: \(err)")
            } else {
                print("Document successfully updated")
            }
        }
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants