Is it possible to deactivate a user, making them invisible in the author list sidebar, without deleting their account? We have some authors who haven't written for us in a while and so we don't want them showing up in our authors sidebar for now. They might be doing some postings in the future, so we'd like to keep their postings in the system and their account in the database.
I guess it's kind of a hiatus setting.
Possible to deactivate a user?
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Possible to deactivate a user?
Hi!
Sadly this is not possible, s9y does not know a "deactivated" switch. Serendipity also currently does not save timestamps of a "last login", so there is actually no data to see when an author logged out and is removed based on that.
A workaround for that could be to set that user's "Publish entries?" flag to "No". Then you can patch the authors sidebar plugin to only show users where this flag is set?
To do that, patch the include/plugin_internal.inc.php file and search for this:
replace it with:
HTH,
Garvin
Sadly this is not possible, s9y does not know a "deactivated" switch. Serendipity also currently does not save timestamps of a "last login", so there is actually no data to see when an author logged out and is removed based on that.
A workaround for that could be to set that user's "Publish entries?" flag to "No". Then you can patch the authors sidebar plugin to only show users where this flag is set?
To do that, patch the include/plugin_internal.inc.php file and search for this:
Code: Select all
if (is_array($authors) && count($authors)) {
foreach ($authors as $auth) {
Code: Select all
if (is_array($authors) && count($authors)) {
foreach ($authors as $auth) {
if ($auth['right_publish'] < 1) continue;
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/
-
stm999999999
- Regular
- Posts: 1531
- Joined: Tue Mar 07, 2006 11:25 pm
- Location: Berlin, Germany
- Contact:
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Shoup: This would then be a 'no_create' privilege, however that value is not in serendipity_authors but in serendipity_config, so it's not available in that foreach-scope. Thus you would also need to patch the SQL query to include the user's specific configuration settings from serendipity_config
stm9x9: This patch is at least present in Serendipity 1.2, where you can define a minimum entry count
Best regards,
Garvin
stm9x9: This patch is at least present in Serendipity 1.2, where you can define a minimum entry count
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/
-
stm999999999
- Regular
- Posts: 1531
- Joined: Tue Mar 07, 2006 11:25 pm
- Location: Berlin, Germany
- Contact: