summaryrefslogtreecommitdiffstats
path: root/lib/private/legacy
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/legacy')
-rw-r--r--lib/private/legacy/user.php2
-rw-r--r--lib/private/legacy/user/backend.php67
-rw-r--r--lib/private/legacy/user/interface.php28
3 files changed, 96 insertions, 1 deletions
diff --git a/lib/private/legacy/user.php b/lib/private/legacy/user.php
index f0e829bbe33..7855b5e7059 100644
--- a/lib/private/legacy/user.php
+++ b/lib/private/legacy/user.php
@@ -94,7 +94,7 @@ class OC_User {
case 'mysql':
case 'sqlite':
\OCP\Util::writeLog('core', 'Adding user backend ' . $backend . '.', \OCP\Util::DEBUG);
- self::$_usedBackends[$backend] = new OC_User_Database();
+ self::$_usedBackends[$backend] = new \OC\User\Database();
\OC::$server->getUserManager()->registerBackend(self::$_usedBackends[$backend]);
break;
case 'dummy':
diff --git a/lib/private/legacy/user/backend.php b/lib/private/legacy/user/backend.php
new file mode 100644
index 00000000000..42c7b9aa126
--- /dev/null
+++ b/lib/private/legacy/user/backend.php
@@ -0,0 +1,67 @@
+<?php
+/**
+ * @author Aldo "xoen" Giambelluca <xoen@xoen.org>
+ * @author Bart Visscher <bartv@thisnet.nl>
+ * @author Björn Schießle <schiessle@owncloud.com>
+ * @author Dominik Schmidt <dev@dominik-schmidt.de>
+ * @author Georg Ehrke <georg@owncloud.com>
+ * @author Jakob Sack <mail@jakobsack.de>
+ * @author Joas Schilling <nickvergessen@owncloud.com>
+ * @author Jörn Friedrich Dreyer <jfd@butonic.de>
+ * @author Lukas Reschke <lukas@owncloud.com>
+ * @author Morris Jobke <hey@morrisjobke.de>
+ * @author Robin Appelman <icewind@owncloud.com>
+ * @author Sam Tuke <mail@samtuke.com>
+ * @author Thomas Müller <thomas.mueller@tmit.eu>
+ * @author Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
+ *
+ * @copyright Copyright (c) 2016, ownCloud, Inc.
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+/**
+ * error code for functions not provided by the user backend
+ * @deprecated Use \OC_User_Backend::NOT_IMPLEMENTED instead
+ */
+define('OC_USER_BACKEND_NOT_IMPLEMENTED', -501);
+
+/**
+ * actions that user backends can define
+ */
+/** @deprecated Use \OC_User_Backend::CREATE_USER instead */
+define('OC_USER_BACKEND_CREATE_USER', 1 << 0);
+/** @deprecated Use \OC_User_Backend::SET_PASSWORD instead */
+define('OC_USER_BACKEND_SET_PASSWORD', 1 << 4);
+/** @deprecated Use \OC_User_Backend::CHECK_PASSWORD instead */
+define('OC_USER_BACKEND_CHECK_PASSWORD', 1 << 8);
+/** @deprecated Use \OC_User_Backend::GET_HOME instead */
+define('OC_USER_BACKEND_GET_HOME', 1 << 12);
+/** @deprecated Use \OC_User_Backend::GET_DISPLAYNAME instead */
+define('OC_USER_BACKEND_GET_DISPLAYNAME', 1 << 16);
+/** @deprecated Use \OC_User_Backend::SET_DISPLAYNAME instead */
+define('OC_USER_BACKEND_SET_DISPLAYNAME', 1 << 20);
+/** @deprecated Use \OC_User_Backend::PROVIDE_AVATAR instead */
+define('OC_USER_BACKEND_PROVIDE_AVATAR', 1 << 24);
+/** @deprecated Use \OC_User_Backend::COUNT_USERS instead */
+define('OC_USER_BACKEND_COUNT_USERS', 1 << 28);
+
+/**
+ * Abstract base class for user management. Provides methods for querying backend
+ * capabilities.
+ */
+abstract class OC_User_Backend extends \OC\User\Backend implements \OCP\UserInterface {
+
+}
diff --git a/lib/private/legacy/user/interface.php b/lib/private/legacy/user/interface.php
new file mode 100644
index 00000000000..d2868a79c2c
--- /dev/null
+++ b/lib/private/legacy/user/interface.php
@@ -0,0 +1,28 @@
+<?php
+/**
+ * @author Arthur Schiwon <blizzz@owncloud.com>
+ * @author Jörn Friedrich Dreyer <jfd@butonic.de>
+ * @author Morris Jobke <hey@morrisjobke.de>
+ *
+ * @copyright Copyright (c) 2016, ownCloud, Inc.
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+/**
+ * Interface OC_User_Interface
+ * @deprecated use the public \OCP\UserInterface instead
+ */
+interface OC_User_Interface extends \OCP\UserInterface {}