User Authentication and Custom Fields
Permalink
Does anyone know of a module for User authentication, registration, and adding custom user fields? In comparison, I think a lot of sites that use vBulletin use their User table for authentcation. Would it make sense to do so with the Concrete5 user table or is it meant only for authenticating the content editors? Thanks in advance!
I found how to add custom User attributes. Would you recommend using this for site member authentication or just to manage content editors? I see where you can add different user groups so I added a Member group. Thanks!
Yeah I recommend user groups as Concrete5 supports the permissions system like that. If you are interested in more permissions, read this:http://www.concrete5.org/help/building_with_concrete5/installation/...
One more thing. I've added custom fields but I can't seem to find how to reference them? I am able to get the predefined user fields but I don't see any methods to call the custom ones. Any idea? :)
Calling them in the php code or ...?
I can retrieve the user info for predefined fields via php script when using the following code ...
but when I print out the array it doesn't contain any of the handle names for my custom fields.
$ui = UserInfo::getByID(1); print_r($ui);
but when I print out the array it doesn't contain any of the handle names for my custom fields.
I'm not entirely sure how to do this, but it has something to do with the UserInfo class, function __call()?
Script from here:http://www.concrete5.org/help/building_with_concrete5/developers/mv...
Script from here:http://www.concrete5.org/help/building_with_concrete5/developers/mv...
$u = new User(); $ui = UserInfo::getByID($u->uID); $gender = $ui->getUserGender(); $team = $ui->getUserFavoriteSportsTeam(); $bio = $ui->getUserBio();
You are correct, I just found the answer before reading your reply. Seehttp://www.concrete5.org/index.php?cID=4431...
You have to get user info object and then call getUser + handle name (replacing with capital letters for each work and removing any underlines)
That's just whacked. Not that it's not cool, but it's not intuitive. Has this feature been documented? This is the sort of thing that loses folks. It took me a half hour or so to figure it out and thank goodness there are people willing to help.
Thanks for helping, Maynar!
You have to get user info object and then call getUser + handle name (replacing with capital letters for each work and removing any underlines)
That's just whacked. Not that it's not cool, but it's not intuitive. Has this feature been documented? This is the sort of thing that loses folks. It took me a half hour or so to figure it out and thank goodness there are people willing to help.
Thanks for helping, Maynar!
It is documented only not in such detail on not under the lines: "Get user attributes".
Documentation is still a issues with Concrete, but people, including me, are working on that.
These kind of things need to be documented better, but questions like this bring up the things that people need documented.
Documentation is still a issues with Concrete, but people, including me, are working on that.
These kind of things need to be documented better, but questions like this bring up the things that people need documented.
However, if you search "help" for "user attributes" the fourth link, below the version histories, entitled "Scripting Common concrete5 tasks" does contain information on how to do this:
http://www.concrete5.org/index.php?cID=4216...
http://www.concrete5.org/index.php?cID=4216...
Every user is allowed to register if you just go to "User Registration" and put it on active/