summaryrefslogtreecommitdiffstats
path: root/core/Controller
diff options
context:
space:
mode:
Diffstat (limited to 'core/Controller')
-rw-r--r--core/Controller/LoginController.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/Controller/LoginController.php b/core/Controller/LoginController.php
index 954a18e8778..abb1df4bcd4 100644
--- a/core/Controller/LoginController.php
+++ b/core/Controller/LoginController.php
@@ -1,8 +1,10 @@
<?php
/**
+ * @copyright Copyright (c) 2017, Sandro Lutz <sandro.lutz@temparus.ch>
* @copyright Copyright (c) 2016 Joas Schilling <coding@schilljs.com>
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
+ * @author Sandro Lutz <sandro.lutz@temparus.ch>
* @author Christoph Wurst <christoph@owncloud.com>
* @author Joas Schilling <coding@schilljs.com>
* @author Lukas Reschke <lukas@statuscode.ch>
@@ -44,6 +46,7 @@ use OCP\IURLGenerator;
use OCP\IUser;
use OCP\IUserManager;
use OCP\IUserSession;
+use OC\Hooks\PublicEmitter;
class LoginController extends Controller {
/** @var IUserManager */
@@ -214,6 +217,10 @@ class LoginController extends Controller {
return $this->generateRedirect($redirect_url);
}
+ if ($this->userManager instanceof PublicEmitter) {
+ $this->userManager->emit('\OC\User', 'preLogin', array($user, $password));
+ }
+
$originalUser = $user;
// TODO: Add all the insane error handling
/* @var $loginResult IUser */