summaryrefslogtreecommitdiff
path: root/app/Model
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-06-27 15:14:04 -0400
committerFrederic Guillot <fred@kanboard.net>2015-06-27 15:14:04 -0400
commit6c772de184505ae339a970631c8e98f3e3b6e5f0 (patch)
tree47aaafd9ef996041c7857db72ad1d274d7b44c42 /app/Model
parente6e286be8315345bed575712b338629e4ba76bcb (diff)
Remove column default_project_id for users because it's useless now
Diffstat (limited to 'app/Model')
-rw-r--r--app/Model/User.php2
-rw-r--r--app/Model/UserSession.php34
2 files changed, 0 insertions, 36 deletions
diff --git a/app/Model/User.php b/app/Model/User.php
index 63b49367..4c32942c 100644
--- a/app/Model/User.php
+++ b/app/Model/User.php
@@ -57,7 +57,6 @@ class User extends Base
'name',
'email',
'is_admin',
- 'default_project_id',
'is_ldap_user',
'notifications_enabled',
'google_id',
@@ -377,7 +376,6 @@ class User extends Base
new Validators\MaxLength('username', t('The maximum length is %d characters', 50), 50),
new Validators\Unique('username', t('The username must be unique'), $this->db->getConnection(), self::TABLE, 'id'),
new Validators\Email('email', t('Email address invalid')),
- new Validators\Integer('default_project_id', t('This value must be an integer')),
new Validators\Integer('is_admin', t('This value must be an integer')),
);
}
diff --git a/app/Model/UserSession.php b/app/Model/UserSession.php
index 6703a1bc..f1f2ffee 100644
--- a/app/Model/UserSession.php
+++ b/app/Model/UserSession.php
@@ -33,7 +33,6 @@ class UserSession extends Base
}
$user['id'] = (int) $user['id'];
- $user['default_project_id'] = (int) $user['default_project_id'];
$user['is_admin'] = (bool) $user['is_admin'];
$user['is_ldap_user'] = (bool) $user['is_ldap_user'];
$user['twofactor_activated'] = (bool) $user['twofactor_activated'];
@@ -95,37 +94,4 @@ class UserSession extends Base
{
return ! empty($this->session['user']);
}
-
- /**
- * Get the last seen project from the session
- *
- * @access public
- * @return integer
- */
- public function getLastSeenProjectId()
- {
- return empty($this->session['last_show_project_id']) ? 0 : $this->session['last_show_project_id'];
- }
-
- /**
- * Get the default project from the session
- *
- * @access public
- * @return integer
- */
- public function getFavoriteProjectId()
- {
- return isset($this->session['user']['default_project_id']) ? $this->session['user']['default_project_id'] : 0;
- }
-
- /**
- * Set the last seen project from the session
- *
- * @access public
- * @param integer $project_id Project id
- */
- public function storeLastSeenProjectId($project_id)
- {
- $this->session['last_show_project_id'] = (int) $project_id;
- }
}