Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 591D3E3F0 for ; Mon, 4 Feb 2013 23:39:44 +0000 (UTC) Received: (qmail 92204 invoked by uid 500); 4 Feb 2013 23:39:42 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 92175 invoked by uid 500); 4 Feb 2013 23:39:42 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 92167 invoked by uid 99); 4 Feb 2013 23:39:42 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Feb 2013 23:39:42 +0000 Received: from localhost (HELO mail-la0-f51.google.com) (127.0.0.1) (smtp-auth username rnewson, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Feb 2013 23:39:42 +0000 Received: by mail-la0-f51.google.com with SMTP id fo13so5216063lab.38 for ; Mon, 04 Feb 2013 15:39:40 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.112.101.130 with SMTP id fg2mr8929328lbb.64.1360021180234; Mon, 04 Feb 2013 15:39:40 -0800 (PST) Received: by 10.112.57.141 with HTTP; Mon, 4 Feb 2013 15:39:39 -0800 (PST) In-Reply-To: References: Date: Mon, 4 Feb 2013 23:39:39 +0000 Message-ID: Subject: Re: Updating a user document in _users db From: Robert Newson To: "user@couchdb.apache.org" Content-Type: text/plain; charset=ISO-8859-1 In 1.2.0 onward; When a "password" field is present, save_doc() will hash the password and write the result to the "password_sha" field, add a "salt" field and delete the "password" field: B. On 4 February 2013 23:28, Mark Hahn wrote: > You either have to include them or use an update handler. An update > handler can just modify some of the fields and leave the others untouched. > > > On Mon, Feb 4, 2013 at 2:49 PM, Pulkit Singhal wrote: > >> If I want to update a user document in the _users db but I don't attach the >> password_sha and salt fields ... does that mean that those fields will be >> cleared from my document and the user will go back to not having a >> password? >> >> Should I perform an update with those fields included as well? >> >> I'm talking about CouchDB v1.2.0 in particular but if someone wants to >> share info about another version, I'm listening. >> >> - Pulkit >>