回答編集履歴
5
バージョン不適合であったため、修正。
answer
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
今一度、以下の記事を読まれてはいかがでしょうか?
|
2
2
|
|
3
|
-
[シンプルな認証と認可のアプリケーション -
|
3
|
+
[シンプルな認証と認可のアプリケーション - 4.x](https://book.cakephp.org/4/ja/tutorials-and-examples/blog-auth-example/auth.html)
|
4
4
|
|
5
5
|
未検証ですが、上記のページと同様に `'action' =>'logout',` の後に `'home'`などを加えると良いのではないでしょうか?(ログインページに当たるものを書く。)
|
6
6
|
|
4
(ログインページに当たるものを書く。)
answer
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
[シンプルな認証と認可のアプリケーション - 3.8](https://book.cakephp.org/3/ja/tutorials-and-examples/blog-auth-example/auth.html)
|
4
4
|
|
5
|
-
未検証ですが、上記のページと同様に `'action' =>'logout',` の後に `'home'`などを加えると良いのではないでしょうか?
|
5
|
+
未検証ですが、上記のページと同様に `'action' =>'logout',` の後に `'home'`などを加えると良いのではないでしょうか?(ログインページに当たるものを書く。)
|
6
6
|
|
7
7
|
```php
|
8
8
|
'logoutRedirect' => [
|
3
修正の一案を提示
answer
CHANGED
@@ -1,3 +1,13 @@
|
|
1
1
|
今一度、以下の記事を読まれてはいかがでしょうか?
|
2
2
|
|
3
|
-
[シンプルな認証と認可のアプリケーション - 3.8](https://book.cakephp.org/3/ja/tutorials-and-examples/blog-auth-example/auth.html)
|
3
|
+
[シンプルな認証と認可のアプリケーション - 3.8](https://book.cakephp.org/3/ja/tutorials-and-examples/blog-auth-example/auth.html)
|
4
|
+
|
5
|
+
未検証ですが、上記のページと同様に `'action' =>'logout',` の後に `'home'`などを加えると良いのではないでしょうか?
|
6
|
+
|
7
|
+
```php
|
8
|
+
'logoutRedirect' => [
|
9
|
+
'controller' =>'User',
|
10
|
+
'action' =>'logout',
|
11
|
+
'home'
|
12
|
+
],
|
13
|
+
```
|
2
実装同じだったので修正
answer
CHANGED
@@ -1,12 +1,3 @@
|
|
1
1
|
今一度、以下の記事を読まれてはいかがでしょうか?
|
2
2
|
|
3
|
-
[シンプルな認証と認可のアプリケーション - 3.8](https://book.cakephp.org/3/ja/tutorials-and-examples/blog-auth-example/auth.html)
|
3
|
+
[シンプルな認証と認可のアプリケーション - 3.8](https://book.cakephp.org/3/ja/tutorials-and-examples/blog-auth-example/auth.html)
|
4
|
-
|
5
|
-
上記の記事だと以下のように実装されてますね。
|
6
|
-
|
7
|
-
```php
|
8
|
-
public function logout()
|
9
|
-
{
|
10
|
-
return $this->redirect($this->Auth->logout());
|
11
|
-
}
|
12
|
-
```
|
1
コード例を転記
answer
CHANGED
@@ -1,6 +1,12 @@
|
|
1
|
-
一度、
|
1
|
+
今一度、以下の記事を読まれてはいかがでしょうか?
|
2
2
|
|
3
3
|
[シンプルな認証と認可のアプリケーション - 3.8](https://book.cakephp.org/3/ja/tutorials-and-examples/blog-auth-example/auth.html)
|
4
4
|
|
5
|
+
上記の記事だと以下のように実装されてますね。
|
5
6
|
|
7
|
+
```php
|
8
|
+
public function logout()
|
9
|
+
{
|
6
|
-
|
10
|
+
return $this->redirect($this->Auth->logout());
|
11
|
+
}
|
12
|
+
```
|