Guest User

Untitled

a guest
Feb 12th, 2014
106
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. db.getSortedSetRange('users:joindate', 0, -1, function(err, uids) {
  2.                    
  3.     function updateUploadedPicture(uid, next) {
  4.         User.getUserFields(uid, ['picture', 'uploadedpicture'], function(err, userData) {
  5.            
  6.             var newPicture = userData.uploadedPicture.replace('http://coinunity.sk', '');
  7.  
  8.             if(userData.uploadedPicture === userData.picture) {
  9.                 User.setUserField(uid, 'picture', newPicture);
  10.             }
  11.            
  12.             User.setUserField(uid, 'uploadedPicture', newPicture, next);
  13.         });
  14.     }
  15.  
  16.     async.each(uids, updateUploadedPicture, next);
  17. });
RAW Paste Data