# Discourse 如何获取导入用户的完整姓名？

**URL:** <https://meta.discourse.org/t/how-does-discourse-get-full-names-of-imported-users/92916>\
**Category:** Development\
**Created:** [2018 年7 月 23 日 09:54 UTC](https://meta.discourse.org/t/how-does-discourse-get-full-names-of-imported-users/92916 "2018-07-23T09:54:51Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

作者： ![mrded](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mrded/32/62438_2.png) [@mrded](https://meta.discourse.org/u/mrded)\
发布日期： [2018 年7 月 23 日 10:14 UTC](https://meta.discourse.org/t/how-does-discourse-get-full-names-of-imported-users/92916/3 "2018-07-23T10:14:30Z")

</div>

> [@gerhard](#):
>
> ser.suggest\_name(opts[:email]) unless opts[:name

Yes, I use the official import script, forgot to mention that `scripts/import_scripts/base.rb`.

And import looks like:

```plaintext
  create_users(query) do |row|
    { 
      id: row['id'], 
      username: row['username'], 
      email: row['email'], 
      created_at: Time.zone.at(row['created_at'])
    }
  end

```

---

_[View the full topic](https://meta.discourse.org/t/how-does-discourse-get-full-names-of-imported-users/92916)._
