diff --git a/src/sbbs3/userdat.c b/src/sbbs3/userdat.c
index 3447f643988e93f988e8da17323974372397ed2f..d24455d7d4f2ddc4a406de998d73a8423479660b 100644
--- a/src/sbbs3/userdat.c
+++ b/src/sbbs3/userdat.c
@@ -2615,9 +2615,9 @@ int putuserstr(scfg_t* cfg, int usernumber, enum user_field fnum, const char *st
 		split_userdat(userdat, field);
 		field[fnum] = (char*)str;
 		if(!seekuserdat(file, usernumber))
-			retval = -4;
-		else
-			writeuserfields(cfg, field, file);
+			retval = USER_SEEK_ERROR;
+		else if(!writeuserfields(cfg, field, file))
+			retval = USER_WRITE_ERROR;
 		unlockuserdat(file, usernumber);
 	}
 	close(file);