Check user is defined first

This commit is contained in:
Tino Vazquez committed 2014-01-10 19:09:13 +01:00
1 parent 64a00f22f7
commit 9d1646fd1b
1 file changed
+1 -1
+1 -1
View File
@@ -85,7 +85,7 @@ module OpenNebula
"Group Name not defined, aborting group create operation"
end
if group_hash[:user][:name] and !group_hash[:admin_group]
if group_hash[:user] && group_hash[:user][:name] and !group_hash[:admin_group]
return -1,
"Admin user defined but not admin group, " +
"aborting group create operation"