diff --git a/admin/js/users.js b/admin/js/users.js
index ad1555c95a1..6a9ae9fc114 100644
--- a/admin/js/users.js
+++ b/admin/js/users.js
@@ -23,7 +23,12 @@ $(document).ready(function(){
groups.push($(this).val());
}
});
- $("#changegroups").prev().html( groups.join(", "));
+ if( groups.length == 0 ){
+ $("#changegroups").prev().html( ' ' );
+ }
+ else{
+ $("#changegroups").prev().html( groups.join(", "));
+ }
}
else{
alert( "something went wrong! sorry!" );
@@ -38,10 +43,15 @@ $(document).ready(function(){
// Manipulating the page after crteating a user
function userCreated( username, groups ){
+ // We need at least a space for showing the div
+ if( groups == "" ){
+ groups = '&nbps;';
+ }
+
// Add user to table
- var newrow = '
| '+username+' | ';
- newrow = newrow+''+groups+' | ';
- newrow = newrow+'edit | remove |
';
+ var newrow = ''+username+' | ';
+ newrow = newrow+''+groups+' | ';
+ newrow = newrow+'remove |
';
$("#usertable").append( newrow );
// Clear forms
@@ -96,7 +106,7 @@ $(document).ready(function(){
//#########################################################################
// Password (clicking on user name)
- $("span[x-use='usernamespan']").live( "click", function(){
+ $("div[x-use='usernamediv']").live( "click", function(){
if( togglepassword == "" || $(this).parent().parent().attr("x-uid") != togglepassword ){
togglepassword = $(this).parent().parent().attr("x-uid");
// Set the username!
@@ -128,7 +138,7 @@ $(document).ready(function(){
});
// Groups
- $("span[x-use='usergroupsspan']").live( "click", function(){
+ $("div[x-use='usergroupsdiv']").live( "click", function(){
if( togglegroup == "" || $(this).parent().parent().attr("x-uid") != togglegroup){
togglegroup = $(this).parent().parent().attr("x-uid");
var groups = $(this).text();
@@ -161,7 +171,12 @@ $(document).ready(function(){
groups.push($(this).val());
}
});
- $(this).html( groups.join(", "));
+ if( groups.length == 0 ){
+ $("#changegroups").prev().html( ' ' );
+ }
+ else{
+ $("#changegroups").prev().html( groups.join(", "));
+ }
$('#changegroups').hide();
togglegroup = "";
}
diff --git a/admin/templates/users.php b/admin/templates/users.php
index 509fca64103..e769dcd4fc5 100644
--- a/admin/templates/users.php
+++ b/admin/templates/users.php
@@ -35,8 +35,8 @@
">
- |
- |
+ |
+ |
remove |
diff --git a/help/appinfo/app.php b/help/appinfo/app.php
index ee308624aaa..fd46085ef77 100644
--- a/help/appinfo/app.php
+++ b/help/appinfo/app.php
@@ -4,7 +4,7 @@ OC_APP::register( array( "order" => 1, "id" => "help", "name" => "Help" ));
// Workaround for having help as the last entry always
$entry = array( "id" => "help", "order" => 1000, "href" => OC_HELPER::linkTo( "help", "index.php" ), "name" => "Help", "icon" => OC_HELPER::imagePath( "help", "help.png" ));
-if( OC_GROUP::inGroup( $_SESSION["user_id"], "admin" )){
+if( isset( $_SESSION["user_id"] ) && OC_GROUP::inGroup( $_SESSION["user_id"], "admin" )){
OC_APP::addAdminPage( $entry );
}
else{