diff options
author | Thomas Mueller <thomas.mueller@tmit.eu> | 2012-09-07 17:21:03 +0400 |
---|---|---|
committer | Thomas Mueller <thomas.mueller@tmit.eu> | 2012-09-07 17:21:03 +0400 |
commit | 3e39901ec9b7612db94206d9fe07d3d6b49f74f0 (patch) | |
tree | 34258047bd60a00b4593906a1468be530f631a25 /django_auth | |
parent | 97a7afb1ebc2bd0ec59ac3dc8a53e2f21e93f335 (diff) |
adding space between) and {
Diffstat (limited to 'django_auth')
-rw-r--r-- | django_auth/lib/group.php | 8 | ||||
-rw-r--r-- | django_auth/lib/user.php | 16 | ||||
-rw-r--r-- | django_auth/settings.php | 4 | ||||
-rw-r--r-- | django_auth/templates/settings.php | 4 |
4 files changed, 16 insertions, 16 deletions
diff --git a/django_auth/lib/group.php b/django_auth/lib/group.php index c5e1f884b..b05e6a1fd 100644 --- a/django_auth/lib/group.php +++ b/django_auth/lib/group.php @@ -119,7 +119,7 @@ class OC_GROUP_DJANGO extends OC_Group_Backend { * * Adds a user to a group. */ - public static function addToGroup( $uid, $gid ){ + public static function addToGroup( $uid, $gid ) { OC_Log::write('OC_Group_Django', 'Use the django webinterface to add users to groups',3); return OC_USER_BACKEND_NOT_IMPLEMENTED; } @@ -132,7 +132,7 @@ class OC_GROUP_DJANGO extends OC_Group_Backend { * * removes the user from a group. */ - public static function removeFromGroup( $uid, $gid ){ + public static function removeFromGroup( $uid, $gid ) { OC_Log::write('OC_Group_Django', 'Use the django webinterface to remove users from groups',3); return OC_USER_BACKEND_NOT_IMPLEMENTED; } @@ -145,7 +145,7 @@ class OC_GROUP_DJANGO extends OC_Group_Backend { * This function fetches all groups a user belongs to. It does not check * if the user exists at all. */ - public static function getUserGroups( $uid ){ + public static function getUserGroups( $uid ) { $query = OC_DB::prepare( 'SELECT `auth_group`.`name` FROM `auth_group` INNER JOIN `auth_user_groups` ON ( `auth_group`.`id` = `auth_user_groups`.`group_id` ) @@ -166,7 +166,7 @@ INNER JOIN `auth_user` ON ( `auth_user`.`id` = `auth_user_groups`.`use * * Returns a list with all groups */ - public static function getGroups(){ + public static function getGroups() { $query = OC_DB::prepare( "SELECT id, name FROM auth_group ORDER BY name" ); $result = $query->execute(); $groups = array(); diff --git a/django_auth/lib/user.php b/django_auth/lib/user.php index 152d0bd8e..b617bd395 100644 --- a/django_auth/lib/user.php +++ b/django_auth/lib/user.php @@ -40,7 +40,7 @@ class OC_USER_DJANGO extends OC_User_Backend { * Creates a new user. Basic checking of username is done in OC_User * itself, not in its subclasses. */ - public function createUser($uid, $password){ + public function createUser($uid, $password) { OC_Log::write('OC_User_Django', 'Use the django webinterface to create users',3); return OC_USER_BACKEND_NOT_IMPLEMENTED; } @@ -52,7 +52,7 @@ class OC_USER_DJANGO extends OC_User_Backend { * * Deletes a user */ - public function deleteUser( $uid ){ + public function deleteUser( $uid ) { OC_Log::write('OC_User_Django', 'Use the django webinterface to delete users',3); return OC_USER_BACKEND_NOT_IMPLEMENTED; } @@ -65,7 +65,7 @@ class OC_USER_DJANGO extends OC_User_Backend { * * Change the password of a user */ - public function setPassword($uid, $password){ + public function setPassword($uid, $password) { OC_Log::write('OC_User_Django', 'Use the django webinterface to change passwords',3); return OC_USER_BACKEND_NOT_IMPLEMENTED; } @@ -76,7 +76,7 @@ class OC_USER_DJANGO extends OC_User_Backend { * @param $sub The String to be found * @returns true/false */ - private function beginsWith($str,$sub){ + private function beginsWith($str,$sub) { return ( substr( $str, 0, strlen( $sub ) ) === $sub ); } @@ -88,13 +88,13 @@ class OC_USER_DJANGO extends OC_User_Backend { * * Check if the password is correct without logging in the user */ - public function checkPassword($uid, $password){ + public function checkPassword($uid, $password) { $query = OC_DB::prepare( 'SELECT username, password FROM auth_user WHERE username = ?' ); $result = $query->execute( array( $uid)); $row = $result->fetchRow(); if ($row) { $storedHash=$row['password']; - if (self::beginsWith($storedHash, 'sha1')){ + if (self::beginsWith($storedHash, 'sha1')) { $chunks = preg_split('/\$/', $storedHash,3); $salt = $chunks[1]; $hash = $chunks[2]; @@ -140,7 +140,7 @@ class OC_USER_DJANGO extends OC_User_Backend { * * Get a list of all users. */ - public function getUsers(){ + public function getUsers() { $query = OC_DB::prepare( 'SELECT id, username, is_active FROM `auth_user` WHERE is_active=1 ORDER BY username' ); $result = $query->execute(); $users = array(); @@ -155,7 +155,7 @@ class OC_USER_DJANGO extends OC_User_Backend { * @param string $uid the username * @return boolean */ - public function userExists($uid){ + public function userExists($uid) { $query = OC_DB::prepare( 'SELECT username FROM `auth_user` WHERE username = ? AND is_active=1' ); $result = $query->execute( array( $uid )); return $result->numRows() > 0; diff --git a/django_auth/settings.php b/django_auth/settings.php index c05e93e9a..314a26d46 100644 --- a/django_auth/settings.php +++ b/django_auth/settings.php @@ -23,8 +23,8 @@ $params = array('staff_is_admin', 'superuser_is_admin'); if ($_POST) { - foreach($params as $param){ - if(isset($_POST[$param])){ + foreach($params as $param) { + if(isset($_POST[$param])) { OC_Appconfig::setValue('django_auth', $param, $_POST[$param]); } else { diff --git a/django_auth/templates/settings.php b/django_auth/templates/settings.php index 3ed9c7c2f..c88c20813 100644 --- a/django_auth/templates/settings.php +++ b/django_auth/templates/settings.php @@ -2,8 +2,8 @@ <fieldset class="personalblock"> <legend><strong>Django Authentification Backend</strong></legend> <p> - <input type="checkbox" name="staff_is_admin" id="staff_is_admin" <?php if ($_['staff_is_admin'] == true){ echo 'checked="checked"';} ?>/><label for="staff_is_admin" ><?php echo $l->t('Django Staffusers get administration privileges');?></label><br/> - <input type="checkbox" name="superuser_is_admin" id="superuser_is_admin" <?php if ($_['superuser_is_admin'] == true){ echo 'checked="checked"';} ?>/><label for="superuser_is_admin"><?php echo $l->t('Django Superusers get administration privileges');?></label> + <input type="checkbox" name="staff_is_admin" id="staff_is_admin" <?php if ($_['staff_is_admin'] == true) { echo 'checked="checked"';} ?>/><label for="staff_is_admin" ><?php echo $l->t('Django Staffusers get administration privileges');?></label><br/> + <input type="checkbox" name="superuser_is_admin" id="superuser_is_admin" <?php if ($_['superuser_is_admin'] == true) { echo 'checked="checked"';} ?>/><label for="superuser_is_admin"><?php echo $l->t('Django Superusers get administration privileges');?></label> </p> <input type="submit" name="django_auth" value="Save" /> </fieldset> |