OSDN Git Service

Guestモードでアクセスできない場合の処理フローを登録画面遷移に変更
authorCake <cake_67@users.sourceforge.jp>
Thu, 16 Dec 2010 07:16:34 +0000 (16:16 +0900)
committerCake <cake_67@users.sourceforge.jp>
Thu, 16 Dec 2010 07:16:34 +0000 (16:16 +0900)
app/controllers/app_controller.php
app/locale/jpn/LC_MESSAGES/default.po

index e5d6b42..09ef0a0 100644 (file)
@@ -362,8 +362,14 @@ class AppController extends Controller
        {
                if (Configure::read('Mode.Demo')) {
                        if ($_SESSION['Auth']['User']['username'] == 'guest') {
-                               $this->Session->setFlash(__('Unavailable Now.', true));
-                               $this->redirect(array('action'=>'index'));
+                               $this->Session->setFlash(__('Unavailable for GUEST.', true));
+
+                               if ($this->site_configs['User.newUserRegist']['value']) {
+                                       $this->redirect(array('controller' => 'users', 'action'=>'add'));
+                               // 新規登録停止の場合
+                               } else {
+                                       $this->redirect(array('action'=>'index'));
+                               }
                        }
                }
        }
index 6e9f1d3..d990da0 100644 (file)
@@ -240,6 +240,9 @@ msgstr "キャラクターを削除しました。"
 msgid "Unavailable Now."
 msgstr "現在使用できません。"
 
+msgid "Unavailable for GUEST."
+msgstr "ゲストアカウントでは使用できません。"
+
 #: /controllers/groups_controller.php:21;41
 msgid "Invalid Group."
 msgstr "不正なデータです。"