larvituser
Advanced tools
Comparing version 0.10.9 to 0.10.10
@@ -376,2 +376,17 @@ 'use strict'; | ||
// Check so the user uuid is valid | ||
tasks.push(function (cb) { | ||
db.query('SELECT * FROM user_users WHERE uuid = ?', userUuidBuf, function (err, rows) { | ||
if (err) return cb(err); | ||
if (rows.length === 0) { | ||
const err = new Error('Invalid user uuid: "' + params.userUuid + '", no records found in database of this user'); | ||
log.warn(logPrefix + err.message); | ||
return cb(err); | ||
} | ||
return cb(); | ||
}); | ||
}); | ||
// Clean out previous data | ||
@@ -378,0 +393,0 @@ tasks.push(function (cb) { |
{ | ||
"name": "larvituser", | ||
"version": "0.10.9", | ||
"version": "0.10.10", | ||
"author": { | ||
@@ -5,0 +5,0 @@ "name": "Mikael 'Lilleman' Göransson", |
@@ -197,3 +197,3 @@ [![Build Status](https://travis-ci.org/larvit/larvituser.svg?branch=master)](https://travis-ci.org/larvit/larvituser) [![Dependencies](https://david-dm.org/larvit/larvituser.svg)](https://david-dm.org/larvit/larvituser.svg) | ||
userLib.setUsername('f9684592-b245-42fa-88c6-9f16b9236ac3', 'theNewUsername', function (err) { | ||
// Now the users password is updated to "theNewUsername" | ||
// Now the users username is updated to "theNewUsername" | ||
}); | ||
@@ -200,0 +200,0 @@ ``` |
78373
2055