missing statement in functions_config.inc.php
Posted: Tue Nov 12, 2013 9:18 pm
I noticed when an author is deleted the entry in table 'serendipity_authorgroups' was not deleted. To fix this I added the following line to the appropriate function 'functions_config.inc.php' file:
/**
* Delete an author account
*
* (Note, this function does not delete entries by an author)
*
* @access public
* @param int The author ID to delete
* @return boolean True on success, false on error or unsufficient privileges
*/
function serendipity_deleteAuthor($authorid) {
global $serendipity;
if (!serendipity_checkPermission('adminUsersDelete')) {
return false;
}
if (serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}authors WHERE authorid=" . (int)$authorid)) {
serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}permalinks WHERE entry_id=" . (int)$authorid ." and type='author'");
serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}authorgroups WHERE authorid=" . (int)$authorid);
}
return true;
}
/**
* Delete an author account
*
* (Note, this function does not delete entries by an author)
*
* @access public
* @param int The author ID to delete
* @return boolean True on success, false on error or unsufficient privileges
*/
function serendipity_deleteAuthor($authorid) {
global $serendipity;
if (!serendipity_checkPermission('adminUsersDelete')) {
return false;
}
if (serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}authors WHERE authorid=" . (int)$authorid)) {
serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}permalinks WHERE entry_id=" . (int)$authorid ." and type='author'");
serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}authorgroups WHERE authorid=" . (int)$authorid);
}
return true;
}