Manual:Hooks/LocalUserCreated/tr

From mediawiki.org
Jump to navigation Jump to search
This page is a translated version of the page Manual:Hooks/LocalUserCreated and the translation is 100% complete.
Other languages:
LocalUserCreated
sürüm 1.26.0 sürümünden mevcuttur
Yerel bir kullanıcı oluşturulduktan ve veritabanına kaydedildikten hemen sonra çağrılır
İşlevi tanımlayın:
public static function onLocalUserCreated( $user, $autocreated ) { ... }
Ek kancası extension.json sürümünde:
{
	"Hooks": {
		"LocalUserCreated": "MyExtensionHooks::onLocalUserCreated"
	}
}
Çağrıdan: Dosya(lar): auth/AuthManager.php
Arayüz: LocalUserCreatedHook.php

Kancaların takılmasıyla ilgili daha fazla bilgi için Manual:Hooks sayfasına bakın.
Bu kancayı kullanan uzantı örnekleri için Category:LocalUserCreated extensions/tr sayfasına bakın.


Details

  • $user: User object for the created user
  • $autocreated: Boolean, whether this was an auto-creation. Note if your wiki uses CentralAuth this will always be true.

Notes

Added in MediaWiki 1,26 as part of the upcoming AuthManager system. Replaces the AuthPlugin::initUser() method call and the AddNewAccount and AuthPluginAutoCreate hooks.

Extensions which implement their own authentication provider might want to use AuthManager::autoCreatedAccount and AuthManager::postAccountCreation instead, which are similar but have access to more information. (Note that postAccountCreation is called significantly later in the process, after secondary authentication providers have finished.)

Changes which are not immediately required for database consistency should probably be deferred; see Database transactions.

See also