cross-solution / YAWIK

YAWIK is a web application. It can be used as an ATS applicant tracking system or as a jobboard.
https://yawik.org
MIT License
125 stars 67 forks source link

Reinviting an employee fails #320

Closed cbleek closed 7 years ago

cbleek commented 7 years ago

If an employee removes his account and the organization tries to reinvite the user again, we get the exception below. Maybe the account is not removed completly:

2016-11-22 20:36:01 EXCEPTION User with ID 583499116b10f8d70d7b23c6 is not active in /home/cbleek/Projects/YAWIK/build/YAWIK-0.27.2/module/Auth/src/Auth/Repository/User.php on line 276
[Trace]
        File: /home/cbleek/Projects/YAWIK/build/YAWIK-0.27.2/module/Auth/src/Auth/Repository/User.php
        Line: 75
    Function: assertEntity
       Class: Auth\Repository\User
        Type: method
------------------------------
        File: /home/cbleek/Projects/YAWIK/build/YAWIK-0.27.2/module/Auth/src/Auth/Repository/User.php
        Line: 174
    Function: findOneBy
       Class: Auth\Repository\User
        Type: method
------------------------------
        File: /home/cbleek/Projects/YAWIK/build/YAWIK-0.27.2/module/Organizations/src/Organizations/Controller/Plugin/InvitationHandler.php
        Line: 308
    Function: findByEmail
       Class: Auth\Repository\User
        Type: method
------------------------------
        File: /home/cbleek/Projects/YAWIK/build/YAWIK-0.27.2/module/Organizations/src/Organizations/Controller/Plugin/InvitationHandler.php
        Line: 237
    Function: loadOrCreateUser
       Class: Organizations\Controller\Plugin\InvitationHandler
        Type: method
------------------------------
        File: /home/cbleek/Projects/YAWIK/build/YAWIK-0.27.2/module/Organizations/src/Organizations/Controller/InviteEmployeeController.php
        Line: 40
    Function: process
       Class: Organizations\Controller\Plugin\InvitationHandler
        Type: method
------------------------------
        File: /home/cbleek/Projects/YAWIK/build/YAWIK-0.27.2/vendor/zendframework/zend-mvc/src/Controller/AbstractActionController.php
        Line: 82
    Function: inviteAction
       Class: Organizations\Controller\InviteEmployeeController
        Type: method
------------------------------
    Function: onDispatch
       Class: Zend\Mvc\Controller\AbstractActionController
        Type: method
------------------------------
        File: /home/cbleek/Projects/YAWIK/build/YAWIK-0.27.2/vendor/zendframework/zend-eventmanager/src/EventManager.php
        Line: 490
    Function: call_user_func
------------------------------
        File: /home/cbleek/Projects/YAWIK/build/YAWIK-0.27.2/vendor/zendframework/zend-eventmanager/src/EventManager.php
        Line: 263
    Function: triggerListeners
       Class: Zend\EventManager\EventManager
        Type: method
------------------------------
        File: /home/cbleek/Projects/YAWIK/build/YAWIK-0.27.2/vendor/zendframework/zend-mvc/src/Controller/AbstractController.php
        Line: 118
    Function: triggerEventUntil
       Class: Zend\EventManager\EventManager
        Type: method
------------------------------
        File: /home/cbleek/Projects/YAWIK/build/YAWIK-0.27.2/vendor/zendframework/zend-mvc/src/DispatchListener.php
        Line: 118
    Function: dispatch
       Class: Zend\Mvc\Controller\AbstractController
        Type: method
------------------------------
    Function: onDispatch
       Class: Zend\Mvc\DispatchListener
        Type: method
------------------------------
        File: /home/cbleek/Projects/YAWIK/build/YAWIK-0.27.2/vendor/zendframework/zend-eventmanager/src/EventManager.php
        Line: 490
    Function: call_user_func
------------------------------
        File: /home/cbleek/Projects/YAWIK/build/YAWIK-0.27.2/vendor/zendframework/zend-eventmanager/src/EventManager.php
        Line: 263
    Function: triggerListeners
       Class: Zend\EventManager\EventManager
        Type: method
------------------------------
        File: /home/cbleek/Projects/YAWIK/build/YAWIK-0.27.2/vendor/zendframework/zend-mvc/src/Application.php
        Line: 340
    Function: triggerEventUntil
       Class: Zend\EventManager\EventManager
        Type: method
------------------------------
        File: /home/cbleek/Projects/YAWIK/build/YAWIK-0.27.2/public/index.php
        Line: 49
    Function: run
       Class: Zend\Mvc\Application
        Type: method
TiSiE commented 7 years ago

Removing an account was implemented in #274 as outlined in #103.

This implementation does indeed only inactivate the user account. Thus, it is working as intended at the moment.

The question is, do we want to remove the account completely or just allow the reinviting of inactive users?

cbleek commented 7 years ago

we want to delete the account completely