2010-07-21 19:53:51 +04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
2011-04-15 19:14:02 +04:00
|
|
|
* ownCloud
|
|
|
|
*
|
|
|
|
* @author Frank Karlitschek
|
|
|
|
* @copyright 2010 Frank Karlitschek karlitschek@kde.org
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 3 of the License, or any later version.
|
|
|
|
*
|
|
|
|
* This library 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 along with this library. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
*/
|
2010-07-21 19:53:51 +04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Base class for user management
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
abstract class OC_USER_BACKEND {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Try to create a new user
|
|
|
|
*
|
2010-07-23 01:42:18 +04:00
|
|
|
* @param string $username The username of the user to create
|
|
|
|
* @param string $password The password of the new user
|
2010-07-21 19:53:51 +04:00
|
|
|
*/
|
2011-04-16 21:45:07 +04:00
|
|
|
public static function createUser($username, $password){}
|
2010-07-21 19:53:51 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Try to login a user
|
|
|
|
*
|
2010-07-23 01:42:18 +04:00
|
|
|
* @param string $username The username of the user to log in
|
|
|
|
* @param string $password The password of the user
|
2010-07-21 19:53:51 +04:00
|
|
|
*/
|
2011-04-16 21:45:07 +04:00
|
|
|
public static function login($username, $password){}
|
2010-07-21 19:53:51 +04:00
|
|
|
|
|
|
|
/**
|
2010-07-23 01:42:18 +04:00
|
|
|
* Check if some user is logged in
|
2010-07-21 19:53:51 +04:00
|
|
|
*
|
|
|
|
*/
|
2011-04-16 21:45:07 +04:00
|
|
|
public static function isLoggedIn(){}
|
2010-07-21 19:53:51 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Generate a random password
|
|
|
|
*/
|
2011-04-16 21:45:07 +04:00
|
|
|
public static function generatePassword(){}
|
2010-07-21 19:53:51 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Set the password of a user
|
|
|
|
*
|
2010-07-23 01:42:18 +04:00
|
|
|
* @param string $username User who password will be changed
|
|
|
|
* @param string $password The new password for the user
|
2010-07-21 19:53:51 +04:00
|
|
|
*/
|
2011-04-16 21:45:07 +04:00
|
|
|
public static function setPassword($username, $password){}
|
2010-07-21 19:53:51 +04:00
|
|
|
|
|
|
|
/**
|
2010-07-23 01:42:18 +04:00
|
|
|
* Check if the password of the user is correct
|
2010-07-21 19:53:51 +04:00
|
|
|
*
|
2010-07-23 01:42:18 +04:00
|
|
|
* @param string $username Name of the user
|
|
|
|
* @param string $password Password of the user
|
2010-07-21 19:53:51 +04:00
|
|
|
*/
|
2011-04-16 21:45:07 +04:00
|
|
|
public static function checkPassword($username, $password){}
|
2010-07-21 19:53:51 +04:00
|
|
|
|
2010-09-15 20:24:14 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* get a list of all users
|
|
|
|
*
|
|
|
|
*/
|
2011-04-16 21:45:07 +04:00
|
|
|
public static function getUsers(){}
|
2010-07-21 19:53:51 +04:00
|
|
|
}
|