New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First login event #26206

Merged
merged 6 commits into from Oct 5, 2016

Conversation

Projects
None yet
3 participants
@DeepDiver1975
Member

DeepDiver1975 commented Sep 23, 2016

Description

Introduces the first login event

Related Issue

Motivation and Context

In the past we had to miss-use the login hook to run initialization code.
Now there is an isolated event

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@DeepDiver1975 DeepDiver1975 added this to the 9.2 milestone Sep 23, 2016

@mention-bot

This comment has been minimized.

Show comment
Hide comment
@mention-bot

mention-bot Sep 23, 2016

@DeepDiver1975, thanks for your PR! By analyzing the annotation information on this pull request, we identified @ChristophWurst, @blizzz, @icewind1991 and @DeepDiver1975 to be potential reviewers

@DeepDiver1975, thanks for your PR! By analyzing the annotation information on this pull request, we identified @ChristophWurst, @blizzz, @icewind1991 and @DeepDiver1975 to be potential reviewers

DeepDiver1975 added some commits Sep 23, 2016

Util::connectHook('OC_User',
'post_login',
$this,
'postLogin');

This comment has been minimized.

@PVince81

PVince81 Oct 4, 2016

Member

I'm not sure we can get rid of this. IIRC some auth code and ext storage relies on this

@PVince81

PVince81 Oct 4, 2016

Member

I'm not sure we can get rid of this. IIRC some auth code and ext storage relies on this

This comment has been minimized.

@DeepDiver1975

DeepDiver1975 Oct 4, 2016

Member

This is only the listener within dav.

@DeepDiver1975

DeepDiver1975 Oct 4, 2016

Member

This is only the listener within dav.

@@ -349,7 +349,6 @@ public function getUserFolder($userId) {
$folder = $folder->get($dir);
} catch (NotFoundException $e) {
$folder = $folder->newFolder($dir);
\OC_Util::copySkeleton($userId, $folder);

This comment has been minimized.

@PVince81

PVince81 Oct 4, 2016

Member

🎉

//trigger creation of user home and /files folder
\OC::$server->getUserFolder($user);
if ($firstTimeLogin) {

This comment has been minimized.

@PVince81

PVince81 Oct 4, 2016

Member

I suppose we can also leverage this to avoid syncing the whole LDAP profile every time a LDAP user logs in ? (something to discuss separately)

CC @butonic

@PVince81

PVince81 Oct 4, 2016

Member

I suppose we can also leverage this to avoid syncing the whole LDAP profile every time a LDAP user logs in ? (something to discuss separately)

CC @butonic

@PVince81

This comment has been minimized.

Show comment
Hide comment
@PVince81

PVince81 Oct 5, 2016

Member

Tested with local users and LDAP, works 👍

Tested by adding an event handler in files_external's app and logging the user from the event.

Member

PVince81 commented Oct 5, 2016

Tested with local users and LDAP, works 👍

Tested by adding an event handler in files_external's app and logging the user from the event.

@PVince81 PVince81 merged commit ccadd7f into master Oct 5, 2016

4 of 5 checks passed

VersionEye Some dependencies have no license.
Details
Scrutinizer 6 new issues, 1 updated code elements
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
licence/cla Contributor License Agreement is signed.
Details

@PVince81 PVince81 deleted the first-login-event branch Oct 5, 2016

@PVince81

This comment has been minimized.

Show comment
Hide comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment