It's a database object, which will also execute other APIs.. like a chain reaction basically.. yes, it handles the ACL as well.It still *appears* to be doing direct database stuff - does the technique outlined there also manage ACL assignment/memberships?
That and gid (gids if J1.7).Probably using "usertype", I guess.
You can add multiple usergroups using "gids", but this only works on J1.7 Accesslevels aren't assigned to users. They're groups of usergroups.Does the standard "Registered\|Voting Member" work, if I need to add multiple user groups? ("Registered" is a bad example to use in a tutorial, as it is both a user group AND an access level).
Correct.The "Establish $user object" tutorial, I assume, is the integer database ID in jos_comprofiler.user_id (which is equivalent to jos_users.id)?
Fixed.PS: In your "create-users-through-api" tutorial, the link embedded in "To create a user you must first Include API externally if you are creating..." does not work.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Indeed, I meant "to add a user to multiple groups".krileon wrote:
That and gid (gids if J1.7).Probably using "usertype", I guess.
You can add multiple usergroups using "gids", but this only works on J1.7 Accesslevels aren't assigned to users. They're groups of usergroups.Does the standard "Registered\|Voting Member" work, if I need to add multiple user groups? ("Registered" is a bad example to use in a tutorial, as it is both a user group AND an access level).
Please Log in or Create an account to join the conversation.
Below will give you query capability, but will ensure the results give you CB user objects.*) get a list of all users,
*) get a list of users based on criteria (e.g. block = 0, registered after = 2011-01-01, etc)
You can load by username using the below which will give you a database object (not a cbUser class object, which has getField API), but that's fine as that's all you get with the method you're already using.*) load a user based on username, for example.
Should work, but never used that method.Am I correct in assuming that I can load a user based on username using:
You specify an array of group ids you want the user to below to (e.g. array( 8, 24 )).To confirm: what is the usage of "gids", in this context? Is it to create a user group, or to specify which groups to assign to this user?
Please Log in or Create an account to join the conversation.
Right! Thanks for the simplified code. I assume that it'll also be somewhat future-proof against minor database table name and column name changes?krileon wrote:
Below will give you query capability, but will ensure the results give you CB user objects.*) get a list of all users,
*) get a list of users based on criteria (e.g. block = 0, registered after = 2011-01-01, etc)
Adding where clauses you can filter it however you like. To filter out blocked users you'll need to join the _users table first.
There's a lot there! It'll take me a while to appreciate the full content, even with NetBeans IDE helping with the navigation and searching.krileon wrote: Please review CB source closely as all this is contained in CBs library files and/or plugin class, plugin foundation, or comprofiler class files. All of which is in CBs administrator component folder.
Please Log in or Create an account to join the conversation.
For any 1.x release, yes. For CB 2.0 I can't guarantee any compatibility as we're doing some major changes.Right! Thanks for the simplified code. I assume that it'll also be somewhat future-proof against minor database table name and column name changes?
Yeah, there's quite a bit of API. It helps to reviewing existing plugins however on usage. Many of the incubator projects use experimental features for example.There's a lot there! It'll take me a while to appreciate the full content, even with NetBeans IDE helping with the navigation and searching.
Please Log in or Create an account to join the conversation.