Forums / Install & configuration / Can't create a user in admin interface.

Can't create a user in admin interface.

Author Message

Josh Rader

Wednesday 22 July 2009 7:47:34 am

We're using eZ Publish 4.0.1 on Windows Server 2003. When I log in to the admin interface with the administrator account, I don't have the option to create a "user" or "user group". Those choices do not appear in the drop-down list next to the 'create here' button. I tried it from all the taps ('content structure', 'User accounts', 'Media Library', etc).

Can someone tell me why the option to create a user or a user group is not listed? Thanks. Is there some other way that users are created in v. 4.0.1? I did a search in the forum and the documentation.

Josh

Josh Rader

Wednesday 22 July 2009 1:07:39 pm

To give a bit more detail. We have 3 class groups: Content, Users and Media. All of the classes from Media and Content show in the dropdown box to create. The two classes in the users class group (user and user group) don't show up in the. Must have something to do with the class group itself not displaying. Anyone got any ideas?

André R.

Wednesday 22 July 2009 2:31:38 pm

Those two classes only show up in the "User accounts" section, and that is decided by the templates.

ref children.tpl in admin design:

   {if $node.path_array|contains( ezini( 'NodeSettings', 'UserRootNode', 'content.ini' ) )}
       {def $can_create_classes = fetch( 'content', 'can_instantiate_class_list', hash( 'group_id', ezini( 'ClassGroupIDs', 'Users', 'content.ini' ), 'parent_node', $node ) )}
   {else}
       {def $can_create_classes = fetch( 'content', 'can_instantiate_class_list', hash( 'group_id', array( ezini( 'ClassGroupIDs', 'Users', 'content.ini' ), ezini( 'ClassGroupIDs', 'Setup', 'content.ini' ) ), 'parent_node', $node, 'filter_type', 'exclude' ) )}
   {/if}

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Josh Rader

Thursday 23 July 2009 5:20:42 am

So how exactly do I create new user? Do I have to edit the template to give us the option to create a new user that can edit content?

Heath

Thursday 23 July 2009 5:44:21 am

It sounds like your installation is incomplete or your admin user does not have permissions

I would prepare to address those problems directly or i might not be inclined to trust the service.

I might suggest starting by confirming the values of the settings mentioned above.

Those are important.

Cheers,
Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Josh Rader

Thursday 23 July 2009 7:40:27 am

In the children.tpl of the admin design, the closest thing I could find to your code is:

---------------------------------------------------------------------------------------------------------------------------------
{let can_create_classes=fetch( content, can_instantiate_class_list, hash( group_id, array( ezini( 'ClassGroupIDs',
'Users', 'content.ini' ), ezini( 'ClassGroupIDs', 'Setup', 'content.ini' ) ), parent_node, $node, filter_type, exclude )
)}

{section show=$node.path_array|contains(ezini( 'NodeSettings', 'UserRootNode', 'content.ini' ) )}
{set can_create_classes=fetch( content, can_instantiate_class_list, hash( group_id, ezini( 'ClassGroupIDs',
'Users', 'content.ini' ), parent_node, $node ) )}
{/section}

------------------------------------------------------------------------------------------------------------------------------------
What part do I need to edit to be able to add users?

Also, is there a way to manually add users in the MySQL database in the 'ezuser' table? Thanks.

Josh Rader

Friday 24 July 2009 12:13:17 pm

^It looks like I have the code you were referring to, Andre, but mine is in a different order. Is there something I am missing?

André R.

Saturday 25 July 2009 1:34:14 am

No, we just update the to the "new"* syntax when we do changes to code.
So it does the same thing.

What heat is suggesting is that you take a look at the settings used there, they are all in content.ini (with default settings from my install here):

[NodeSettings]
UserRootNode=5

[ClassGroupIDs]
Setup=4
Users=2

You can see these visually in admin including information about possible override values (in ini files that override the base ini settings) by going to -> Setup -> INI Settings -> content.ini + <admin_siteaccess_name> + Select

As for the meaning of these settings to understand what they do, this is almost always to some extent described in the base ini file, normally in settings/<file>.ini, unless its a extension specific ini file where it would be extension/<extension>/settings/<file>.ini[.append.php]

In this case its settings/content.ini:
http://pubsvn.ez.no/nextgen/trunk/settings/content.ini

ClassGroupIDs is however not described, it is like the name hints a bunch of class group id's for built in class groups.
You can find them in -> Setup -> Classes

To me it sounds like your user and user group classes are not member of the User class group for some reason, if you cant figure it out, simply change the code you pasted to something like (try without "'parent_node', false()" if it gives warnings):

{let can_create_classes=fetch( 'content', 'can_instantiate_class_list', hash( 'parent_node', false() ))}

* was new in 3.6

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Josh Rader

Sunday 26 July 2009 6:37:31 pm

Ok, I so I know I am supposed to make the following setting in the site.ini file:

UserClassGroupID= class_group_id

Our class_group_id the user class group is 2, I made sure the site.ini, override site.ini.append.php, and the siteaccess site.ini.append.php all were set to "UserClassGroupID=2", but the User Setting tab *still* shows the menu from the Content Structure and Media Library, but not user.

Also, I check to make sure that both 'User' and 'User Group' were legit classes in the Users class group and they are. Any more clues to help me out?

Where is the standard dropdown list (for Content Structure and Media Library) pulling their list options from? Maybe that option is overriding my User Settings options. Any help is appreciated. Thanks.

Josh

Dennis Fricke

Wednesday 09 June 2010 6:08:55 am

Same problem here. I getting it when i switch my database from mysql to oracle. Everything working fine the only thing i cant do is add a new user while my dropdown menu is empty.

Someone found meanwhile a fix for this problem?