/**
  * Assign to given user the next available unix_uid
  *
  * We need to pass the whole user object and to modify it in this
  * method to avoid conflicts if updateDb is used after this call. As
  * updateDb will perform a select on user table to check what changed
  * between the user table and the user object, the user object must contains
  * what was updated by this method.
  *
  * @param PFUser $user A user object to update
  *
  * @return Boolean
  */
 function assignNextUnixUid($user)
 {
     $newUid = $this->getDao()->assignNextUnixUid($user->getId());
     if ($newUid !== false) {
         $user->setUnixUid($newUid);
         return true;
     }
     return false;
 }