From 97216b0f4138c664ee2bfd93e335458bcdc9f332 Mon Sep 17 00:00:00 2001 From: Dan Cryer Date: Fri, 9 Oct 2015 11:10:14 +0100 Subject: [PATCH] Fixing login stuff --- ...0151009100610_remove_unique_name_index.php | 40 +++++++++++++++++++ PHPCI/View/User/index.phtml | 2 +- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 PHPCI/Migrations/20151009100610_remove_unique_name_index.php diff --git a/PHPCI/Migrations/20151009100610_remove_unique_name_index.php b/PHPCI/Migrations/20151009100610_remove_unique_name_index.php new file mode 100644 index 00000000..283dfbc0 --- /dev/null +++ b/PHPCI/Migrations/20151009100610_remove_unique_name_index.php @@ -0,0 +1,40 @@ +table('user'); + + if ($user->hasIndex('name', array('unique' => true))) { + $user->removeIndex('name', array('unique' => true)); + $user->save(); + } + + $user->addIndex('name', array('unique' => false)); + $user->save(); + } +} diff --git a/PHPCI/View/User/index.phtml b/PHPCI/View/User/index.phtml index 15208667..061be90f 100644 --- a/PHPCI/View/User/index.phtml +++ b/PHPCI/View/User/index.phtml @@ -40,7 +40,7 @@ User()->getIsAdmin()): ?> -
+