]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix the webdav user backend. still not completel working but a frist step
authorFrank Karlitschek <frank@owncloud.org>
Mon, 5 Nov 2012 09:46:28 +0000 (10:46 +0100)
committerFrank Karlitschek <frank@owncloud.org>
Mon, 5 Nov 2012 09:46:28 +0000 (10:46 +0100)
apps/user_webdavauth/templates/settings.php
apps/user_webdavauth/user_webdavauth.php

index c00c199632af5c8979017f28ef3c5db92c7baf75..e6ca5d97d3c29d15987bf8e3da90426890174016 100755 (executable)
@@ -1,7 +1,7 @@
 <form id="webdavauth" action="#" method="post">
        <fieldset class="personalblock">
                <legend><strong>WebDAV Authentication</strong></legend>
-               <p><label for="webdav_url"><?php echo $l->t('webdav_url');?><input type="text" id="webdav_url" name="webdav_url" value="<?php echo $_['webdav_url']; ?>"></label>
+               <p><label for="webdav_url"><?php echo $l->t('WebDAV URL: http://');?><input type="text" id="webdav_url" name="webdav_url" value="<?php echo $_['webdav_url']; ?>"></label>
                <input type="submit" value="Save" />
        </fieldset>
 </form>
index 5a16a4c992a3cc82d62bd5f417a50771661ac4db..2af8e9f103dd6437cf5140d39cf1e996ef106d65 100755 (executable)
@@ -34,7 +34,7 @@ class OC_USER_WEBDAVAUTH extends OC_User_Backend {
                return false;
        }
 
-       public function deleteUser() {
+       public function deleteUser($uid) {
                // Can't delete user
                OC_Log::write('OC_USER_WEBDAVAUTH', 'Not possible to delete users from web frontend using WebDAV user backend', 3);
                return false;
@@ -47,7 +47,6 @@ class OC_USER_WEBDAVAUTH extends OC_User_Backend {
        }
 
        public function checkPassword( $uid, $password ) {
-
                $url= 'http://'.urlencode($uid).':'.urlencode($password).'@'.$this->webdavauth_url;
                $headers = get_headers($url);
                if($headers==false) {
@@ -58,9 +57,9 @@ class OC_USER_WEBDAVAUTH extends OC_User_Backend {
                $returncode= substr($headers[0], 9, 3);
 
                if($returncode=='401') {
-                       return false;
+                       return(false);
                }else{
-                       return true;
+                       return($uid);
                }
 
        }
@@ -75,7 +74,7 @@ class OC_USER_WEBDAVAUTH extends OC_User_Backend {
        /*
        * we donĀ“t know the users so all we can do it return an empty array here
        */
-       public function getUsers() {
+       public function getUsers($search = '', $limit = 10, $offset = 0) {
                $returnArray = array();
 
                return $returnArray;