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
124 stars 67 forks source link

Registering with Email then with Facebook #138

Closed manager24 closed 8 years ago

manager24 commented 9 years ago

I did a test registering with email first, logged out and then registered the same test person with facebook. I received the following error message. Zusätzliche Informationen: MongoCursorException

Datei:

/data/www/YAWIK/vendor/doctrine/mongodb/lib/Doctrine/MongoDB/Collection.php:876

Nachricht:

localhost:27017: E11000 duplicate key error index: karriere24.users.$login_1  dup key: { : "barbara.klein@live.de" }

Stapelverlauf:

#0 /data/www/YAWIK/vendor/doctrine/mongodb/lib/Doctrine/MongoDB/Collection.php(876): MongoCollection->batchInsert(Array, Array)
#1 /data/www/YAWIK/vendor/doctrine/mongodb/lib/Doctrine/MongoDB/Collection.php(142): Doctrine\MongoDB\Collection->doBatchInsert(Array, Array)
#2 /data/www/YAWIK/vendor/doctrine/mongodb-odm/lib/Doctrine/ODM/MongoDB/Persisters/DocumentPersister.php(242): Doctrine\MongoDB\Collection->batchInsert(Array, Array)
#3 /data/www/YAWIK/vendor/doctrine/mongodb-odm/lib/Doctrine/ODM/MongoDB/UnitOfWork.php(1057): Doctrine\ODM\MongoDB\Persisters\DocumentPersister->executeInserts(Array)
#4 /data/www/YAWIK/vendor/doctrine/mongodb-odm/lib/Doctrine/ODM/MongoDB/UnitOfWork.php(447): Doctrine\ODM\MongoDB\UnitOfWork->executeInserts(Object(Doctrine\ODM\MongoDB\Mapping\ClassMetadata), Array)
#5 /data/www/YAWIK/vendor/doctrine/mongodb-odm/lib/Doctrine/ODM/MongoDB/DocumentManager.php(526): Doctrine\ODM\MongoDB\UnitOfWork->commit(NULL, Array)
#6 /data/www/YAWIK/module/Auth/src/Auth/Adapter/HybridAuth.php(126): Doctrine\ODM\MongoDB\DocumentManager->flush()
#7 /data/www/YAWIK/vendor/zendframework/zend-authentication/src/AuthenticationService.php(110): Auth\Adapter\HybridAuth->authenticate()
#8 /data/www/YAWIK/module/Auth/src/Auth/AuthenticationService.php(82): Zend\Authentication\AuthenticationService->authenticate(Object(Auth\Adapter\HybridAuth))
#9 /data/www/YAWIK/module/Auth/src/Auth/Controller/IndexController.php(183): Auth\AuthenticationService->authenticate(Object(Auth\Adapter\HybridAuth))
#10 /data/www/YAWIK/vendor/zendframework/zend-mvc/src/Controller/AbstractActionController.php(82): Auth\Controller\IndexController->loginAction()
#11 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
#12 /data/www/YAWIK/vendor/zendframework/zend-eventmanager/src/EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#13 /data/www/YAWIK/vendor/zendframework/zend-eventmanager/src/EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#14 /data/www/YAWIK/vendor/zendframework/zend-mvc/src/Controller/AbstractController.php(118): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#15 /data/www/YAWIK/vendor/zendframework/zend-mvc/src/DispatchListener.php(93): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))
#16 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#17 /data/www/YAWIK/vendor/zendframework/zend-eventmanager/src/EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#18 /data/www/YAWIK/vendor/zendframework/zend-eventmanager/src/EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#19 /data/www/YAWIK/vendor/zendframework/zend-mvc/src/Application.php(314): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#20 /data/www/YAWIK/public/index.php(51): Zend\Mvc\Application->run()
#21 {main}
cbleek commented 9 years ago

The email address is unique. Technically it would be possible to merge accounts automatically. But we think, that we are not allowed to merge an existing account with a new created one automatically without to permission of the existing user. Maybe we make this configurable.

In this case, the error message should be:

Account cound not be created, because the email of your Facebook Account already exists.

Connecting a YAWIK account to a Social Network is no problem. An authenticated YAWIK user woud actively connect his YAWIK account. And after it, he would be able to login to his YAWIK Account via his Social Network.

This feature will be added. Maybe somewhere in the users profile section

Thanks for reporting

utrenkner commented 8 years ago

Same error found here.

I fully support Carsten's comment on not merging account automatically.

But the error messages should be hidden away from the user. The info is not beautiful and too technical for the end user. Furthermore it gives away too many details of the configuration.

cbleek commented 8 years ago

this will be done in #198