> For the complete documentation index, see [llms.txt](https://ayakaleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ayakaleaf-pro.ayaka.space/on-premises/ko/user-and-project-management/user-management/username-migration.md).

# 사용자 이름 마이그레이션

## 사용자 이름 마이그레이션

로그인 관점에서 사용자의 기본 식별자는 이메일 주소입니다. 로컬 기반 인증에서 SSO로 마이그레이션하거나 한 IdP에서 다른 IdP로 마이그레이션하는 경우 사용자의 이메일 주소를 업데이트해야 할 수 있습니다.

이를 돕기 위해 다음 형식의 CSV 파일을 사용하여 사용자 이메일을 마이그레이션하는 스크립트가 제공됩니다:

`이전이메일,새이메일`

몇 가지 유효성 검사 후, 스크립트는 CSV 파일을 순회하며 사용자의 이메일 주소를 다음에서 업데이트합니다 `이전이메일` 에서 `새이메일`.

### **유효성 검사**

마이그레이션을 실행하기 전에 `<csv_file>` 다음 사항을 확인하기 위해 검사됩니다:

* 각 행에서 둘 다 `이전이메일` 및 `새이메일` 유효한 이메일 주소입니다
* 중복 항목이 없습니다. 예를 들어 서로 다른 사용자를 동일한 새 이메일 주소로 업데이트하려고 하거나, 이미 사용 중인 이메일 주소로 동일한 사용자 계정을 업데이트하려고 하지 않습니다.

### **사용법** <a href="#usage" id="usage"></a>

{% code overflow="wrap" %}

```bash
docker cp <csv_file> sharelatex:/overleaf/services/web/<csv_file> docker exec sharelatex /bin/bash -c "cd /overleaf/services/web;node ./modules/server-ce-scripts/scripts/migrate-user-emails.js [--commit] [--continue|--ignore-missing] [--admin-id=ADMIN_USER_ID] <csv_file>"
```

{% endcode %}

### **플래그** <a href="#flags" id="flags"></a>

| 이름                 | 설명                                                                                                                                                                            |
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--commit`         | <p>다음 항목을 포함하면 <code>--commit</code> 플래그가 실제로 마이그레이션을 수행합니다. 생략하면 변경 사항은 적용되지 않지만 유효성 검사는 계속 수행되는 드라이런 모드에서 마이그레이션이 실행됩니다.<br><br><strong>기본값</strong>:<code>false</code></p> |
| `--continue`       | 다음 `--continue` 플래그는 사용자 계정의 이메일 주소가 이미 업데이트된 경우에도 마이그레이션 프로세스를 계속 진행합니다                                                                                                      |
| `--ignore-missing` | 다음 `--ignore-missing` 플래그는 사용자 계정을 찾을 수 없는 경우에도 마이그레이션 프로세스를 계속 진행합니다                                                                                                         |
| `--admin-id`       | 다음 `--admin-id` 은 마이그레이션을 수행하는 관리자의 ID로 설정해야 하며 감사 로그 항목에 사용됩니다. 다음으로 이동하세요 **관리자** > **사용자 관리** 에서 이메일 주소를 검색하고 첫 번째 결과를 클릭하여 사용자 ID를 찾으세요.                                  |
| `<csv_file>`       | 다음 `<csv_file>` 은 다음 형식으로 이전 및 새 이메일 주소가 포함된 파일입니다                                                                                                                            |

### **완료** <a href="#completion" id="completion"></a>

마이그레이션 스크립트를 실행하는 동안 선택한 플래그에 따라 오류를 콘솔에 기록한 후 계속 진행할지, 또는 콘솔에 기록한 후 종료할지가 결정됩니다. 오류로 인해 스크립트가 조기에 종료되면, 성공하지 못했음을 나타내기 위해 종료 코드 1로 종료됩니다.

마이그레이션이 완료되면 스크립트는 성공, 실패 및 건너뛴 업데이트 수를 콘솔에 기록합니다. 마이그레이션이 성공적으로 완료되면 종료 코드 0으로 종료됩니다.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ayakaleaf-pro.ayaka.space/on-premises/ko/user-and-project-management/user-management/username-migration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
