Skip to content
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
Merged

First login event #26206

merged 6 commits into from
Oct 5, 2016

Conversation

DeepDiver1975
Copy link
Member

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
Copy link

@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 DeepDiver1975 force-pushed the first-login-event branch 2 times, most recently from 43d9b75 to 899d6e7 Compare October 4, 2016 12:37
Util::connectHook('OC_User',
'post_login',
$this,
'postLogin');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

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

if ($firstTimeLogin) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor

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
@PVince81 PVince81 deleted the first-login-event branch October 5, 2016 08:39
@PVince81
Copy link
Contributor

PVince81 commented Oct 5, 2016

added to features wiki page: https://github.com/owncloud/core/wiki/ownCloud-9.2-Features

@lock
Copy link

lock bot commented Aug 4, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants