mscherer 2 年之前
父节点
当前提交
3af319f753
共有 4 个文件被更改,包括 5 次插入44 次删除
  1. 0 41
      docs/Auth/MultiColumn.md
  2. 2 0
      docs/Behavior/Passwordable.md
  3. 0 3
      docs/README.md
  4. 3 0
      docs/Upgrade.md

+ 0 - 41
docs/Auth/MultiColumn.md

@@ -1,41 +0,0 @@
-# MultiColumnAuthenticate
-
-By default the FormAuthenticate class only allows a single field to be used.
-But often times you want to provide a login input field as combined one, so the user can log in with either email or username.
-
-For this make sure your login form contains:
-```php
-echo $this->Form->control('login');
-echo $this->Form->control('password', ['autocomplete' => 'off']);
-```
-
-Then set up the Auth component:
-```php
-    //in $components
-    protected $components = [
-        'Auth' => [
-            'authenticate' => [
-                'Tools.MultiColumn' => [
-                    'fields' => [
-                        'username' => 'login',
-                        'password' => 'password'
-                    ],
-                    'columns' => ['username', 'email'],
-                ]
-            ]
-        ]
-    ];
-
-    // Or in beforeFilter()
-    $this->Auth->config('authenticate', [
-        'Tools.MultiColumn' => [
-            'fields' => [
-                'username' => 'login',
-                'password' => 'password'
-            ],
-            'columns' => ['username', 'email'],
-        ]
-    ]);
-```
-
-Of course you can still combine it with custom finders to add a scope or contain relations just as the core Form one.

+ 2 - 0
docs/Behavior/Passwordable.md

@@ -12,6 +12,8 @@ Also capable of:
 - Require current password prior to altering it (current => true)
 - Don't allow the same password it was before (allowSame => false)
 
+Note: This works best together with [TinyAuth plugin](https://github.com/dereuromark/cakephp-tinyauth).
+
 ## Configs
 | Key  | Default | Description |
 | ------------- | ------------- | ------------- |

+ 0 - 3
docs/README.md

@@ -17,9 +17,6 @@ I18n:
 ErrorHandler
 * [ErrorHandler](Error/ErrorHandler.md) for improved error handling.
 
-Auth
-* [MultiColumnAuthenticate](Auth/MultiColumn.md) for log-in with e.g. "email or username"
-
 Email
 * [Email](Mailer/Email.md) for sending Emails
 

+ 3 - 0
docs/Upgrade.md

@@ -3,6 +3,9 @@
 ## CommonComponent
 - `setHelpers()` has been removed in favor of core usage directly.
 
+## Auth
+- MultiColumn authentication has fully been moved to [TinyAuth](https://github.com/dereuromark/cakephp-tinyauth) plugin.
+
 ## Utility
 - `L10n`, `Mime` classes have been removed
 - Mutable `Time` class has been removed, use immutable `DateTime` instead.