summaryrefslogtreecommitdiff
path: root/app/Core
diff options
context:
space:
mode:
Diffstat (limited to 'app/Core')
-rw-r--r--app/Core/Action/ActionManager.php4
-rw-r--r--app/Core/Base.php260
-rw-r--r--app/Core/Event/EventManager.php22
-rw-r--r--app/Core/Markdown.php4
-rw-r--r--app/Core/User/GroupSync.php8
-rw-r--r--app/Core/User/UserProfile.php6
-rw-r--r--app/Core/User/UserSession.php2
-rw-r--r--app/Core/User/UserSync.php8
8 files changed, 157 insertions, 157 deletions
diff --git a/app/Core/Action/ActionManager.php b/app/Core/Action/ActionManager.php
index dfa5a140..1dfd820c 100644
--- a/app/Core/Action/ActionManager.php
+++ b/app/Core/Action/ActionManager.php
@@ -121,9 +121,9 @@ class ActionManager extends Base
public function attachEvents()
{
if ($this->userSession->isLogged()) {
- $actions = $this->action->getAllByUser($this->userSession->getId());
+ $actions = $this->actionModel->getAllByUser($this->userSession->getId());
} else {
- $actions = $this->action->getAll();
+ $actions = $this->actionModel->getAll();
}
foreach ($actions as $action) {
diff --git a/app/Core/Base.php b/app/Core/Base.php
index e490484c..99c093e4 100644
--- a/app/Core/Base.php
+++ b/app/Core/Base.php
@@ -10,136 +10,136 @@ use Pimple\Container;
* @package core
* @author Frederic Guillot
*
- * @property \Kanboard\Analytic\TaskDistributionAnalytic $taskDistributionAnalytic
- * @property \Kanboard\Analytic\UserDistributionAnalytic $userDistributionAnalytic
- * @property \Kanboard\Analytic\EstimatedTimeComparisonAnalytic $estimatedTimeComparisonAnalytic
- * @property \Kanboard\Analytic\AverageLeadCycleTimeAnalytic $averageLeadCycleTimeAnalytic
- * @property \Kanboard\Analytic\AverageTimeSpentColumnAnalytic $averageTimeSpentColumnAnalytic
- * @property \Kanboard\Core\Action\ActionManager $actionManager
- * @property \Kanboard\Core\ExternalLink\ExternalLinkManager $externalLinkManager
- * @property \Kanboard\Core\Cache\MemoryCache $memoryCache
- * @property \Kanboard\Core\Event\EventManager $eventManager
- * @property \Kanboard\Core\Group\GroupManager $groupManager
- * @property \Kanboard\Core\Http\Client $httpClient
- * @property \Kanboard\Core\Http\OAuth2 $oauth
- * @property \Kanboard\Core\Http\RememberMeCookie $rememberMeCookie
- * @property \Kanboard\Core\Http\Request $request
- * @property \Kanboard\Core\Http\Response $response
- * @property \Kanboard\Core\Http\Router $router
- * @property \Kanboard\Core\Http\Route $route
- * @property \Kanboard\Core\Queue\QueueManager $queueManager
- * @property \Kanboard\Core\Mail\Client $emailClient
- * @property \Kanboard\Core\ObjectStorage\ObjectStorageInterface $objectStorage
- * @property \Kanboard\Core\Plugin\Hook $hook
- * @property \Kanboard\Core\Plugin\Loader $pluginLoader
- * @property \Kanboard\Core\Security\AuthenticationManager $authenticationManager
- * @property \Kanboard\Core\Security\AccessMap $applicationAccessMap
- * @property \Kanboard\Core\Security\AccessMap $projectAccessMap
- * @property \Kanboard\Core\Security\Authorization $applicationAuthorization
- * @property \Kanboard\Core\Security\Authorization $projectAuthorization
- * @property \Kanboard\Core\Security\Role $role
- * @property \Kanboard\Core\Security\Token $token
- * @property \Kanboard\Core\Session\FlashMessage $flash
- * @property \Kanboard\Core\Session\SessionManager $sessionManager
- * @property \Kanboard\Core\Session\SessionStorage $sessionStorage
- * @property \Kanboard\Core\User\Avatar\AvatarManager $avatarManager
- * @property \Kanboard\Core\User\GroupSync $groupSync
- * @property \Kanboard\Core\User\UserProfile $userProfile
- * @property \Kanboard\Core\User\UserSync $userSync
- * @property \Kanboard\Core\User\UserSession $userSession
- * @property \Kanboard\Core\DateParser $dateParser
- * @property \Kanboard\Core\Helper $helper
- * @property \Kanboard\Core\Paginator $paginator
- * @property \Kanboard\Core\Template $template
- * @property \Kanboard\Model\Action $action
- * @property \Kanboard\Model\ActionParameter $actionParameter
- * @property \Kanboard\Model\AvatarFile $avatarFile
- * @property \Kanboard\Model\Board $board
- * @property \Kanboard\Model\Category $category
- * @property \Kanboard\Model\Color $color
- * @property \Kanboard\Model\Column $column
- * @property \Kanboard\Model\Comment $comment
- * @property \Kanboard\Model\Config $config
- * @property \Kanboard\Model\Currency $currency
- * @property \Kanboard\Model\CustomFilter $customFilter
- * @property \Kanboard\Model\TaskFile $taskFile
- * @property \Kanboard\Model\ProjectFile $projectFile
- * @property \Kanboard\Model\Group $group
- * @property \Kanboard\Model\GroupMember $groupMember
- * @property \Kanboard\Model\Language $language
- * @property \Kanboard\Model\LastLogin $lastLogin
- * @property \Kanboard\Model\Link $link
- * @property \Kanboard\Model\Notification $notification
- * @property \Kanboard\Model\PasswordReset $passwordReset
- * @property \Kanboard\Model\Project $project
- * @property \Kanboard\Model\ProjectActivity $projectActivity
- * @property \Kanboard\Model\ProjectDuplication $projectDuplication
- * @property \Kanboard\Model\ProjectDailyColumnStats $projectDailyColumnStats
- * @property \Kanboard\Model\ProjectDailyStats $projectDailyStats
- * @property \Kanboard\Model\ProjectMetadata $projectMetadata
- * @property \Kanboard\Model\ProjectPermission $projectPermission
- * @property \Kanboard\Model\ProjectUserRole $projectUserRole
- * @property \Kanboard\Model\ProjectGroupRole $projectGroupRole
- * @property \Kanboard\Model\ProjectNotification $projectNotification
- * @property \Kanboard\Model\ProjectNotificationType $projectNotificationType
- * @property \Kanboard\Model\RememberMeSession $rememberMeSession
- * @property \Kanboard\Model\Subtask $subtask
- * @property \Kanboard\Model\SubtaskTimeTracking $subtaskTimeTracking
- * @property \Kanboard\Model\Swimlane $swimlane
- * @property \Kanboard\Model\Task $task
- * @property \Kanboard\Model\TaskAnalytic $taskAnalytic
- * @property \Kanboard\Model\TaskCreation $taskCreation
- * @property \Kanboard\Model\TaskDuplication $taskDuplication
- * @property \Kanboard\Model\TaskExternalLink $taskExternalLink
- * @property \Kanboard\Model\TaskFinder $taskFinder
- * @property \Kanboard\Model\TaskLink $taskLink
- * @property \Kanboard\Model\TaskModification $taskModification
- * @property \Kanboard\Model\TaskPosition $taskPosition
- * @property \Kanboard\Model\TaskStatus $taskStatus
- * @property \Kanboard\Model\TaskMetadata $taskMetadata
- * @property \Kanboard\Model\Timezone $timezone
- * @property \Kanboard\Model\Transition $transition
- * @property \Kanboard\Model\User $user
- * @property \Kanboard\Model\UserLocking $userLocking
- * @property \Kanboard\Model\UserMention $userMention
- * @property \Kanboard\Model\UserNotification $userNotification
- * @property \Kanboard\Model\UserNotificationType $userNotificationType
- * @property \Kanboard\Model\UserNotificationFilter $userNotificationFilter
- * @property \Kanboard\Model\UserUnreadNotification $userUnreadNotification
- * @property \Kanboard\Model\UserMetadata $userMetadata
- * @property \Kanboard\Validator\ActionValidator $actionValidator
- * @property \Kanboard\Validator\AuthValidator $authValidator
- * @property \Kanboard\Validator\ColumnValidator $columnValidator
- * @property \Kanboard\Validator\CategoryValidator $categoryValidator
- * @property \Kanboard\Validator\CommentValidator $commentValidator
- * @property \Kanboard\Validator\CurrencyValidator $currencyValidator
- * @property \Kanboard\Validator\CustomFilterValidator $customFilterValidator
- * @property \Kanboard\Validator\GroupValidator $groupValidator
- * @property \Kanboard\Validator\LinkValidator $linkValidator
- * @property \Kanboard\Validator\PasswordResetValidator $passwordResetValidator
- * @property \Kanboard\Validator\ProjectValidator $projectValidator
- * @property \Kanboard\Validator\SubtaskValidator $subtaskValidator
- * @property \Kanboard\Validator\SwimlaneValidator $swimlaneValidator
- * @property \Kanboard\Validator\TaskLinkValidator $taskLinkValidator
- * @property \Kanboard\Validator\ExternalLinkValidator $externalLinkValidator
- * @property \Kanboard\Validator\TaskValidator $taskValidator
- * @property \Kanboard\Validator\UserValidator $userValidator
- * @property \Kanboard\Import\TaskImport $taskImport
- * @property \Kanboard\Import\UserImport $userImport
- * @property \Kanboard\Export\SubtaskExport $subtaskExport
- * @property \Kanboard\Export\TaskExport $taskExport
- * @property \Kanboard\Export\TransitionExport $transitionExport
- * @property \Kanboard\Core\Filter\QueryBuilder $projectGroupRoleQuery
- * @property \Kanboard\Core\Filter\QueryBuilder $projectUserRoleQuery
- * @property \Kanboard\Core\Filter\QueryBuilder $projectActivityQuery
- * @property \Kanboard\Core\Filter\QueryBuilder $userQuery
- * @property \Kanboard\Core\Filter\QueryBuilder $projectQuery
- * @property \Kanboard\Core\Filter\QueryBuilder $taskQuery
- * @property \Kanboard\Core\Filter\LexerBuilder $taskLexer
- * @property \Kanboard\Core\Filter\LexerBuilder $projectActivityLexer
- * @property \Psr\Log\LoggerInterface $logger
- * @property \PicoDb\Database $db
- * @property \Symfony\Component\EventDispatcher\EventDispatcher $dispatcher
+ * @property \Kanboard\Analytic\TaskDistributionAnalytic $taskDistributionAnalytic
+ * @property \Kanboard\Analytic\UserDistributionAnalytic $userDistributionAnalytic
+ * @property \Kanboard\Analytic\EstimatedTimeComparisonAnalytic $estimatedTimeComparisonAnalytic
+ * @property \Kanboard\Analytic\AverageLeadCycleTimeAnalytic $averageLeadCycleTimeAnalytic
+ * @property \Kanboard\Analytic\AverageTimeSpentColumnAnalytic $averageTimeSpentColumnAnalytic
+ * @property \Kanboard\Core\Action\ActionManager $actionManager
+ * @property \Kanboard\Core\ExternalLink\ExternalLinkManager $externalLinkManager
+ * @property \Kanboard\Core\Cache\MemoryCache $memoryCache
+ * @property \Kanboard\Core\Event\EventManager $eventManager
+ * @property \Kanboard\Core\Group\GroupManager $groupManager
+ * @property \Kanboard\Core\Http\Client $httpClient
+ * @property \Kanboard\Core\Http\OAuth2 $oauth
+ * @property \Kanboard\Core\Http\RememberMeCookie $rememberMeCookie
+ * @property \Kanboard\Core\Http\Request $request
+ * @property \Kanboard\Core\Http\Response $response
+ * @property \Kanboard\Core\Http\Router $router
+ * @property \Kanboard\Core\Http\Route $route
+ * @property \Kanboard\Core\Queue\QueueManager $queueManager
+ * @property \Kanboard\Core\Mail\Client $emailClient
+ * @property \Kanboard\Core\ObjectStorage\ObjectStorageInterface $objectStorage
+ * @property \Kanboard\Core\Plugin\Hook $hook
+ * @property \Kanboard\Core\Plugin\Loader $pluginLoader
+ * @property \Kanboard\Core\Security\AuthenticationManager $authenticationManager
+ * @property \Kanboard\Core\Security\AccessMap $applicationAccessMap
+ * @property \Kanboard\Core\Security\AccessMap $projectAccessMap
+ * @property \Kanboard\Core\Security\Authorization $applicationAuthorization
+ * @property \Kanboard\Core\Security\Authorization $projectAuthorization
+ * @property \Kanboard\Core\Security\Role $role
+ * @property \Kanboard\Core\Security\Token $token
+ * @property \Kanboard\Core\Session\FlashMessage $flash
+ * @property \Kanboard\Core\Session\SessionManager $sessionManager
+ * @property \Kanboard\Core\Session\SessionStorage $sessionStorage
+ * @property \Kanboard\Core\User\Avatar\AvatarManager $avatarManager
+ * @property \Kanboard\Core\User\GroupSync $groupSync
+ * @property \Kanboard\Core\User\UserProfile $userProfile
+ * @property \Kanboard\Core\User\UserSync $userSync
+ * @property \Kanboard\Core\User\UserSession $userSession
+ * @property \Kanboard\Core\DateParser $dateParser
+ * @property \Kanboard\Core\Helper $helper
+ * @property \Kanboard\Core\Paginator $paginator
+ * @property \Kanboard\Core\Template $template
+ * @property \Kanboard\Model\ActionModel $actionModel
+ * @property \Kanboard\Model\ActionParameterModel $actionParameterModel
+ * @property \Kanboard\Model\AvatarFileModel $avatarFileModel
+ * @property \Kanboard\Model\BoardModel $boardModel
+ * @property \Kanboard\Model\CategoryModel $categoryModel
+ * @property \Kanboard\Model\ColorModel $colorModel
+ * @property \Kanboard\Model\ColumnModel $columnModel
+ * @property \Kanboard\Model\CommentModel $commentModel
+ * @property \Kanboard\Model\ConfigModel $configModel
+ * @property \Kanboard\Model\CurrencyModel $currencyModel
+ * @property \Kanboard\Model\CustomFilterModel $customFilterModel
+ * @property \Kanboard\Model\TaskFileModel $taskFileModel
+ * @property \Kanboard\Model\ProjectFileModel $projectFileModel
+ * @property \Kanboard\Model\GroupModel $groupModel
+ * @property \Kanboard\Model\GroupMemberModel $groupMemberModel
+ * @property \Kanboard\Model\LanguageModel $languageModel
+ * @property \Kanboard\Model\LastLoginModel $lastLoginModel
+ * @property \Kanboard\Model\LinkModel $linkModel
+ * @property \Kanboard\Model\NotificationModel $notificationModel
+ * @property \Kanboard\Model\PasswordResetModel $passwordResetModel
+ * @property \Kanboard\Model\ProjectModel $projectModel
+ * @property \Kanboard\Model\ProjectActivityModel $projectActivityModel
+ * @property \Kanboard\Model\ProjectDuplicationModel $projectDuplicationModel
+ * @property \Kanboard\Model\ProjectDailyColumnStatsModel $projectDailyColumnStatsModel
+ * @property \Kanboard\Model\ProjectDailyStatsModel $projectDailyStatsModel
+ * @property \Kanboard\Model\ProjectMetadataModel $projectMetadataModel
+ * @property \Kanboard\Model\ProjectPermissionModel $projectPermissionModel
+ * @property \Kanboard\Model\ProjectUserRoleModel $projectUserRoleModel
+ * @property \Kanboard\Model\ProjectGroupRoleModel $projectGroupRoleModel
+ * @property \Kanboard\Model\ProjectNotificationModel $projectNotificationModel
+ * @property \Kanboard\Model\ProjectNotificationTypeModel $projectNotificationTypeModel
+ * @property \Kanboard\Model\RememberMeSessionModel $rememberMeSessionModel
+ * @property \Kanboard\Model\SubtaskModel $subtaskModel
+ * @property \Kanboard\Model\SubtaskTimeTrackingModel $subtaskTimeTrackingModel
+ * @property \Kanboard\Model\SwimlaneModel $swimlaneModel
+ * @property \Kanboard\Model\TaskModel $taskModel
+ * @property \Kanboard\Model\TaskAnalyticModel $taskAnalyticModel
+ * @property \Kanboard\Model\TaskCreationModel $taskCreationModel
+ * @property \Kanboard\Model\TaskDuplicationModel $taskDuplicationModel
+ * @property \Kanboard\Model\TaskExternalLinkModel $taskExternalLinkModel
+ * @property \Kanboard\Model\TaskFinderModel $taskFinderModel
+ * @property \Kanboard\Model\TaskLinkModel $taskLinkModel
+ * @property \Kanboard\Model\TaskModificationModel $taskModificationModel
+ * @property \Kanboard\Model\TaskPositionModel $taskPositionModel
+ * @property \Kanboard\Model\TaskStatusModel $taskStatusModel
+ * @property \Kanboard\Model\TaskMetadataModel $taskMetadataModel
+ * @property \Kanboard\Model\TimezoneModel $timezoneModel
+ * @property \Kanboard\Model\TransitionModel $transitionModel
+ * @property \Kanboard\Model\UserModel $userModel
+ * @property \Kanboard\Model\UserLockingModel $userLockingModel
+ * @property \Kanboard\Model\UserMentionModel $userMentionModel
+ * @property \Kanboard\Model\UserNotificationModel $userNotificationModel
+ * @property \Kanboard\Model\UserNotificationTypeModel $userNotificationTypeModel
+ * @property \Kanboard\Model\UserNotificationFilterModel $userNotificationFilterModel
+ * @property \Kanboard\Model\UserUnreadNotificationModel $userUnreadNotificationModel
+ * @property \Kanboard\Model\UserMetadataModel $userMetadataModel
+ * @property \Kanboard\Validator\ActionValidator $actionValidator
+ * @property \Kanboard\Validator\AuthValidator $authValidator
+ * @property \Kanboard\Validator\ColumnValidator $columnValidator
+ * @property \Kanboard\Validator\CategoryValidator $categoryValidator
+ * @property \Kanboard\Validator\CommentValidator $commentValidator
+ * @property \Kanboard\Validator\CurrencyValidator $currencyValidator
+ * @property \Kanboard\Validator\CustomFilterValidator $customFilterValidator
+ * @property \Kanboard\Validator\GroupValidator $groupValidator
+ * @property \Kanboard\Validator\LinkValidator $linkValidator
+ * @property \Kanboard\Validator\PasswordResetValidator $passwordResetValidator
+ * @property \Kanboard\Validator\ProjectValidator $projectValidator
+ * @property \Kanboard\Validator\SubtaskValidator $subtaskValidator
+ * @property \Kanboard\Validator\SwimlaneValidator $swimlaneValidator
+ * @property \Kanboard\Validator\TaskLinkValidator $taskLinkValidator
+ * @property \Kanboard\Validator\ExternalLinkValidator $externalLinkValidator
+ * @property \Kanboard\Validator\TaskValidator $taskValidator
+ * @property \Kanboard\Validator\UserValidator $userValidator
+ * @property \Kanboard\Import\TaskImport $taskImport
+ * @property \Kanboard\Import\UserImport $userImport
+ * @property \Kanboard\Export\SubtaskExport $subtaskExport
+ * @property \Kanboard\Export\TaskExport $taskExport
+ * @property \Kanboard\Export\TransitionExport $transitionExport
+ * @property \Kanboard\Core\Filter\QueryBuilder $projectGroupRoleQuery
+ * @property \Kanboard\Core\Filter\QueryBuilder $projectUserRoleQuery
+ * @property \Kanboard\Core\Filter\QueryBuilder $projectActivityQuery
+ * @property \Kanboard\Core\Filter\QueryBuilder $userQuery
+ * @property \Kanboard\Core\Filter\QueryBuilder $projectQuery
+ * @property \Kanboard\Core\Filter\QueryBuilder $taskQuery
+ * @property \Kanboard\Core\Filter\LexerBuilder $taskLexer
+ * @property \Kanboard\Core\Filter\LexerBuilder $projectActivityLexer
+ * @property \Psr\Log\LoggerInterface $logger
+ * @property \PicoDb\Database $db
+ * @property \Symfony\Component\EventDispatcher\EventDispatcher $dispatcher
*/
abstract class Base
{
diff --git a/app/Core/Event/EventManager.php b/app/Core/Event/EventManager.php
index 162d23e8..9ae43170 100644
--- a/app/Core/Event/EventManager.php
+++ b/app/Core/Event/EventManager.php
@@ -2,8 +2,8 @@
namespace Kanboard\Core\Event;
-use Kanboard\Model\Task;
-use Kanboard\Model\TaskLink;
+use Kanboard\Model\TaskModel;
+use Kanboard\Model\TaskLinkModel;
/**
* Event Manager
@@ -44,15 +44,15 @@ class EventManager
public function getAll()
{
$events = array(
- TaskLink::EVENT_CREATE_UPDATE => t('Task link creation or modification'),
- Task::EVENT_MOVE_COLUMN => t('Move a task to another column'),
- Task::EVENT_UPDATE => t('Task modification'),
- Task::EVENT_CREATE => t('Task creation'),
- Task::EVENT_OPEN => t('Reopen a task'),
- Task::EVENT_CLOSE => t('Closing a task'),
- Task::EVENT_CREATE_UPDATE => t('Task creation or modification'),
- Task::EVENT_ASSIGNEE_CHANGE => t('Task assignee change'),
- Task::EVENT_DAILY_CRONJOB => t('Daily background job for tasks'),
+ TaskLinkModel::EVENT_CREATE_UPDATE => t('Task link creation or modification'),
+ TaskModel::EVENT_MOVE_COLUMN => t('Move a task to another column'),
+ TaskModel::EVENT_UPDATE => t('Task modification'),
+ TaskModel::EVENT_CREATE => t('Task creation'),
+ TaskModel::EVENT_OPEN => t('Reopen a task'),
+ TaskModel::EVENT_CLOSE => t('Closing a task'),
+ TaskModel::EVENT_CREATE_UPDATE => t('Task creation or modification'),
+ TaskModel::EVENT_ASSIGNEE_CHANGE => t('Task assignee change'),
+ TaskModel::EVENT_DAILY_CRONJOB => t('Daily background job for tasks'),
);
$events = array_merge($events, $this->events);
diff --git a/app/Core/Markdown.php b/app/Core/Markdown.php
index 592c29b1..b5abe5ed 100644
--- a/app/Core/Markdown.php
+++ b/app/Core/Markdown.php
@@ -87,7 +87,7 @@ class Markdown extends Parsedown
protected function inlineUserLink(array $Excerpt)
{
if (! $this->isPublicLink && preg_match('/^@([^\s]+)/', $Excerpt['text'], $matches)) {
- $user_id = $this->container['user']->getIdByUsername($matches[1]);
+ $user_id = $this->container['userModel']->getIdByUsername($matches[1]);
if (! empty($user_id)) {
$url = $this->container['helper']->url->href('UserViewController', 'profile', array('user_id' => $user_id));
@@ -116,7 +116,7 @@ class Markdown extends Parsedown
private function buildTaskLink($task_id)
{
if ($this->isPublicLink) {
- $token = $this->container['memoryCache']->proxy($this->container['taskFinder'], 'getProjectToken', $task_id);
+ $token = $this->container['memoryCache']->proxy($this->container['taskFinderModel'], 'getProjectToken', $task_id);
if (! empty($token)) {
return $this->container['helper']->url->href(
diff --git a/app/Core/User/GroupSync.php b/app/Core/User/GroupSync.php
index 4e08d574..d0bb647b 100644
--- a/app/Core/User/GroupSync.php
+++ b/app/Core/User/GroupSync.php
@@ -21,7 +21,7 @@ class GroupSync extends Base
*/
public function synchronize($userId, array $externalGroupIds)
{
- $userGroups = $this->groupMember->getGroups($userId);
+ $userGroups = $this->groupMemberModel->getGroups($userId);
$this->addGroups($userId, $userGroups, $externalGroupIds);
$this->removeGroups($userId, $userGroups, $externalGroupIds);
}
@@ -40,10 +40,10 @@ class GroupSync extends Base
foreach ($externalGroupIds as $externalGroupId) {
if (! isset($userGroupIds[$externalGroupId])) {
- $group = $this->group->getByExternalId($externalGroupId);
+ $group = $this->groupModel->getByExternalId($externalGroupId);
if (! empty($group)) {
- $this->groupMember->addUser($group['id'], $userId);
+ $this->groupMemberModel->addUser($group['id'], $userId);
}
}
}
@@ -61,7 +61,7 @@ class GroupSync extends Base
{
foreach ($userGroups as $userGroup) {
if (! empty($userGroup['external_id']) && ! in_array($userGroup['external_id'], $externalGroupIds)) {
- $this->groupMember->removeUser($userGroup['id'], $userId);
+ $this->groupMemberModel->removeUser($userGroup['id'], $userId);
}
}
}
diff --git a/app/Core/User/UserProfile.php b/app/Core/User/UserProfile.php
index 4f873390..8b9ebb71 100644
--- a/app/Core/User/UserProfile.php
+++ b/app/Core/User/UserProfile.php
@@ -25,12 +25,12 @@ class UserProfile extends Base
*/
public function assign($userId, UserProviderInterface $user)
{
- $profile = $this->user->getById($userId);
+ $profile = $this->userModel->getById($userId);
$values = UserProperty::filterProperties($profile, UserProperty::getProperties($user));
$values['id'] = $userId;
- if ($this->user->update($values)) {
+ if ($this->userModel->update($values)) {
$profile = array_merge($profile, $values);
$this->userSession->initialize($profile);
return true;
@@ -49,7 +49,7 @@ class UserProfile extends Base
public function initialize(UserProviderInterface $user)
{
if ($user->getInternalId()) {
- $profile = $this->user->getById($user->getInternalId());
+ $profile = $this->userModel->getById($user->getInternalId());
} elseif ($user->getExternalIdColumn() && $user->getExternalId()) {
$profile = $this->userSync->synchronize($user);
$this->groupSync->synchronize($profile['id'], $user->getExternalGroupIds());
diff --git a/app/Core/User/UserSession.php b/app/Core/User/UserSession.php
index 0034c47a..9c63f07a 100644
--- a/app/Core/User/UserSession.php
+++ b/app/Core/User/UserSession.php
@@ -22,7 +22,7 @@ class UserSession extends Base
public function refresh($user_id)
{
if ($this->getId() == $user_id) {
- $this->initialize($this->user->getById($user_id));
+ $this->initialize($this->userModel->getById($user_id));
}
}
diff --git a/app/Core/User/UserSync.php b/app/Core/User/UserSync.php
index 055c7106..c2f85498 100644
--- a/app/Core/User/UserSync.php
+++ b/app/Core/User/UserSync.php
@@ -21,7 +21,7 @@ class UserSync extends Base
*/
public function synchronize(UserProviderInterface $user)
{
- $profile = $this->user->getByExternalId($user->getExternalIdColumn(), $user->getExternalId());
+ $profile = $this->userModel->getByExternalId($user->getExternalIdColumn(), $user->getExternalId());
$properties = UserProperty::getProperties($user);
if (! empty($profile)) {
@@ -47,7 +47,7 @@ class UserSync extends Base
if (! empty($values)) {
$values['id'] = $profile['id'];
- $result = $this->user->update($values);
+ $result = $this->userModel->update($values);
return $result ? array_merge($profile, $properties) : $profile;
}
@@ -64,13 +64,13 @@ class UserSync extends Base
*/
private function createUser(UserProviderInterface $user, array $properties)
{
- $userId = $this->user->create($properties);
+ $userId = $this->userModel->create($properties);
if ($userId === false) {
$this->logger->error('Unable to create user profile: '.$user->getExternalId());
return array();
}
- return $this->user->getById($userId);
+ return $this->userModel->getById($userId);
}
}