Hi
I am using s9y (which is great!!!) in a communities site. Each defined group has a private blog, viewed only by members of this group and written by the group's manager.
When a new user registers to the site, his personal details are stored in the site "users" table.
My question appears to be simple: can I tell s9y to look for details such as login, password, email etc. in the site's "users" table instead of serendipity_authors?
Another related question is: when a user writes a comment, and since there are no "anonymous" users in this site, I would like his name and mail to appear automatically (from the "users" table), instead of letting him fill those fields by himself.
I thought of modifying a plugin such as serendipity_event_externalauth, which creates new entries in serendipity_authors, but I am not happy with this solution, since I will end up having the same data in two different tables. This can lead to troubles when updating or deleting a user from the site.
Is there a solution for this kind of implementation of s9y?
* BTW each group also have a forum, and it would be a shame if eventually each user record will appear in THREE tables…
Using external users-table instead of serendipity_authors
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Using external users-table instead of serendipity_author
Hi!
You cannot easily do this. If you are using MySQL5, you can create a virtual VIEW for a faked serendipity_authors DB table. That is advanced stuff, though.
HTH,
Garvin
You cannot easily do this. If you are using MySQL5, you can create a virtual VIEW for a faked serendipity_authors DB table. That is advanced stuff, though.
You can use the Plugin "User Self-Registration", this has an option to "prevent identity theft" and will auto-fill the logged in user name into the field. You can disable the other functionality of the plugin that allows users to become members on their own.Another related question is: when a user writes a comment, and since there are no "anonymous" users in this site, I would like his name and mail to appear automatically (from the "users" table), instead of letting him fill those fields by himself.
HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Partially. A VIEW can only be written to (INSERT, UPDATE) if it contains a 1:1 relation (see http://dev.mysql.com/doc/refman/5.0/en/create-view.html). So if you map a foreign user database to serendipity_Authors and it has extra columns, serendpity will no longer be able to update/write to the serendipity_authors table.
So in many cases you loose the ability to add new users within serendipity, and must instead add those users using the central user database.
Serendipity itself stores user properties and group associations in the serendipity_authorgroups and serendipity_config tables. Those only refer to the ID of serendipity_authors, so you might need to update the master user database process to insert values into those DB tables, yes.
Best regards,
Garvin
Partially. A VIEW can only be written to (INSERT, UPDATE) if it contains a 1:1 relation (see http://dev.mysql.com/doc/refman/5.0/en/create-view.html). So if you map a foreign user database to serendipity_Authors and it has extra columns, serendpity will no longer be able to update/write to the serendipity_authors table.
So in many cases you loose the ability to add new users within serendipity, and must instead add those users using the central user database.
Serendipity itself stores user properties and group associations in the serendipity_authorgroups and serendipity_config tables. Those only refer to the ID of serendipity_authors, so you might need to update the master user database process to insert values into those DB tables, yes.
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
I'd be very interested in your results. So far I've only theortically evaluated this solution but never tried it "live". So you could help a lot by telling us how to proceeded, and if you faced any trouble along the way.
Best regards,
Garvin
I'd be very interested in your results. So far I've only theortically evaluated this solution but never tried it "live". So you could help a lot by telling us how to proceeded, and if you faced any trouble along the way.
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
We Have the Same Issue
Please do post your results. We are integrating Serendipity into our web application, which already has user registrations in another database entirely. We want to quietly log our users in as blog authors behind the scenes.
Any tips folks might have would be greatly appreciated. Likewise, we'll share what we come up with as well.
Any tips folks might have would be greatly appreciated. Likewise, we'll share what we come up with as well.
Cheers,
-queej
-queej