<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>http://wiki.mipt.ru/index.php?action=history&amp;feed=atom&amp;title=External_database_authentication</id>
	<title>External database authentication - История изменений</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.mipt.ru/index.php?action=history&amp;feed=atom&amp;title=External_database_authentication"/>
	<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=External_database_authentication&amp;action=history"/>
	<updated>2026-05-06T16:36:42Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>http://wiki.mipt.ru/index.php?title=External_database_authentication&amp;diff=33063&amp;oldid=prev</id>
		<title>Олег Давидович в 09:07, 5 февраля 2026</title>
		<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=External_database_authentication&amp;diff=33063&amp;oldid=prev"/>
		<updated>2026-02-05T09:07:51Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Предыдущая версия&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Версия от 09:07, 5 февраля 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l43&quot;&gt;Строка 43:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 43:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*[[External database enrolment]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*[[External database enrolment]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;de&lt;/del&gt;:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Externe Datenbank&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Категория&lt;/ins&gt;:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Аутентификация&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;fr&lt;/del&gt;:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Authentification par base de données externe]]&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Категория&lt;/ins&gt;:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Способы зачисления на курс&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[ja:外部データベース認証]]&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[es:Autenticación con BasedeDatos externa&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Олег Давидович</name></author>
	</entry>
	<entry>
		<id>http://wiki.mipt.ru/index.php?title=External_database_authentication&amp;diff=875&amp;oldid=prev</id>
		<title>Олег Давидович: 1 версия импортирована</title>
		<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=External_database_authentication&amp;diff=875&amp;oldid=prev"/>
		<updated>2024-10-14T18:17:38Z</updated>

		<summary type="html">&lt;p&gt;1 версия импортирована&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Предыдущая версия&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Версия от 18:17, 14 октября 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Олег Давидович</name></author>
	</entry>
	<entry>
		<id>http://wiki.mipt.ru/index.php?title=External_database_authentication&amp;diff=874&amp;oldid=prev</id>
		<title>1&gt;Leonstr: /* Automatic Synchronisation */ auth/db/cli/sync_users.php has been deprecated since Moodle 3.3 (MDL-57913)</title>
		<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=External_database_authentication&amp;diff=874&amp;oldid=prev"/>
		<updated>2021-03-12T13:11:04Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Automatic Synchronisation: &lt;/span&gt; auth/db/cli/sync_users.php has been deprecated since Moodle 3.3 (MDL-57913)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Authentication}}&lt;br /&gt;
Location: &amp;#039;&amp;#039; Site administration &amp;gt; Plugins &amp;gt; Authentication &amp;gt; External database&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This method uses an external database table to check whether a given username (which must be varchar)  and password is valid. If the user does not currently exist in Moodle a new account will be created and their information copied from the external database. &lt;br /&gt;
&lt;br /&gt;
== Field mappings ==&lt;br /&gt;
&lt;br /&gt;
This is done by mapping fields at the bottom of the database authentication page. Each data field in the user profile has a text field next to it. Enter the name of the column in the external database that maps to the profile data field.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Update Local&amp;#039;&amp;#039;&amp;#039; - Specifies that the external data will be entered into the local field in question&lt;br /&gt;
* On Creation - specifies that this will only happen on the original login when the account is created for the first time.&lt;br /&gt;
* On Every Login - specifies that changes in the external data will be updated on the local Moodle field in question the next time the user logs in again.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Update External&amp;#039;&amp;#039;&amp;#039; - Specifies just the opposite, meaning changes in the local Moodle field in question will update the corresponding field in the external database&lt;br /&gt;
* Never - Specifies this is disabled&lt;br /&gt;
* On Update - Enables this to happen if a change is made locally (additional configuration is probably required)&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Lock Value&amp;#039;&amp;#039;&amp;#039; - Only determines whether the local user can make a change in the Moodle field and does not affect the two settings above.&lt;br /&gt;
* Unlocked - A user can make changes locally in the Moodle field (assumably even if it contradicts the external database the next login would change it again if Update Local is set&lt;br /&gt;
* Locked - A user can never make changes&lt;br /&gt;
* Unlocked if empty - A user can only make changes if the field is not populated already from the external database (this would seem to indicate a user could only enter something into this field once and could not change it after saving)&lt;br /&gt;
&lt;br /&gt;
== Automatic Synchronisation ==&lt;br /&gt;
&lt;br /&gt;
The above method adds new users only when they log in. If you want user accounts to be created in Moodle independent of actual logins, you must enable the auth_db &amp;#039;&amp;#039;Synchronise users task&amp;#039;&amp;#039; (\auth_db\task\sync_users) on the [[Scheduled tasks]] page. By default this runs once a day, adjust the schedule to run this more frequently if required.&lt;br /&gt;
&lt;br /&gt;
If you have custom profile fields on your site, these can also be synced with this scheduled task.&lt;br /&gt;
&lt;br /&gt;
==Additional Notes==&lt;br /&gt;
&lt;br /&gt;
It is now possible to  use Salted Crypt passwords for the password format with external database authentication from the Password format setting:&lt;br /&gt;
[[File:dbsaltedcrypt.png|thumb|300px|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Plain text password matching is now always case sensitive&lt;br /&gt;
* sha1/md5 hash comparisons are now enforced case insensitive (as underlying they are hexadecimal values)&lt;br /&gt;
&lt;br /&gt;
* Some of the things that apply to [[Upload users]] apply to the External database, but not all of the fields in the [[Upload users]] are available for the External Database authentication. The only available fields are the fields listed in the data mapping section of the admin page for the External Database connection.&lt;br /&gt;
* Note that for MySQL databases moodle will store date custom profile fields in a bigint field (as a unix timestamp). Using a timestamp or datetime field will not work&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[External database enrolment]]&lt;br /&gt;
&lt;br /&gt;
[[de:Externe Datenbank]]&lt;br /&gt;
[[fr:Authentification par base de données externe]]&lt;br /&gt;
[[ja:外部データベース認証]]&lt;br /&gt;
[[es:Autenticación con BasedeDatos externa]]&lt;/div&gt;</summary>
		<author><name>1&gt;Leonstr</name></author>
	</entry>
</feed>