> 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/ar/idarh-almstkhdmyn-walmsharya/user-management/username-migration.md).

# ترحيل اسم المستخدم

## ترحيل أسماء المستخدمين

من منظور تسجيل الدخول، فإن المعرّف الأساسي للمستخدم هو عنوان بريده الإلكتروني. إذا كنت تُرحِّل من المصادقة المحلية إلى SSO أو كنت تُرحِّل من موفّر هوية (IdP) إلى آخر، فقد يُطلب منك تحديث عناوين البريد الإلكتروني للمستخدمين.

للمساعدة في ذلك، تم توفير برنامج نصي سيقوم بترحيل رسائل البريد الإلكتروني للمستخدمين باستخدام ملف CSV بالصيغة التالية:

`oldEmail,newEmail`

بعد إجراء بعض عمليات التحقق من الصحة، سيقوم البرنامج النصي بالتكرار عبر ملف CSV وتحديث عناوين البريد الإلكتروني للمستخدمين من `oldEmail` إلى `newEmail`.

### **التحقق من الصحة**

قبل تشغيل الترحيل، سيتم التحقق من `<csv_file>` للتأكد من أن:

* لكل صف، كلٌّ من `oldEmail` و `newEmail` عنوانَي بريد إلكتروني صالحان
* لا توجد إدخالات مكررة، على سبيل المثال، لا تحاول تحديث مستخدمين مختلفين إلى عنوان البريد الإلكتروني الجديد نفسه، أو أنك تحاول تحديث حساب المستخدم نفسه بعنوان بريد إلكتروني مستخدم بالفعل

### **الاستخدام** <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> هذا الخيار بالفعل إلى تنفيذ الترحيل. وعند حذفه، سيُجرى الترحيل في وضع التشغيل التجريبي (dry-run) حيث لا تُجرى أي تغييرات، ولكن يستمر تنفيذ التحقق من الصحة.<br><br><strong>افتراضي</strong>:<code>false</code></p> |
| `--continue`       | يجب أن يكون `--continue` سيواصل هذا الخيار عملية الترحيل إذا كان حساب المستخدم قد تم تحديث عنوان البريد الإلكتروني عليه بالفعل                                                                                                                          |
| `--ignore-missing` | يجب أن يكون `--ignore-missing` سيواصل هذا الخيار عملية الترحيل إذا لم يتم العثور على حساب مستخدم                                                                                                                                                        |
| `--admin-id`       | يجب أن يكون `--admin-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/ar/idarh-almstkhdmyn-walmsharya/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.
