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

Enables users to connect their YAWIK account to multiple social networks #198

Closed cbleek closed 8 years ago

cbleek commented 8 years ago

Enable a yawik user to connect his profile to multiple social networks.

Currently, if a user registers with a social network, the users social network profile is stored into the "profile" attribute of the User Entity.

https://github.com/cross-solution/YAWIK/blob/develop/module/Auth/src/Auth/Entity/User.php#L85

this entity stores simply the returned array of HybridAuth. A new Attributes "profiles" has to be created, which can take multiple profiles. In addution, the authentication has to be adjusted. The authetication is called in ...

https://github.com/cross-solution/YAWIK/blob/develop/module/Auth/src/Auth/Controller/IndexController.php#L201

... and handelt in ...

The method findByProfileIdentifier has to be modified. To get BC the method should first check, if a user can be identified using the new "profiles" attribute. If it fails, it should try to identify the user against the old "profile" attribute. If the authetication against the old "profile" is successfull, the old "profile" should be copied into the new profiles attribute. So we can make the old "profile" attribute deprecated.

https://github.com/cross-solution/YAWIK/blob/develop/module/Auth/src/Auth/Repository/User.php#L87

A yawik users then should be enabled to attach multiple social profiles to his yawik accound. To get an idea of ​​how this could look, I've simply added the Fieldset of an application formular to the users profile form (see screenshot)

auswahl_917

The Social Profiles Fieldset is defined in.

https://github.com/cross-solution/YAWIK/blob/develop/module/Auth/src/Auth/Form/SocialProfiles.php

cbleek commented 8 years ago

this was done by @fedys. Thanks a lot.