summaryrefslogtreecommitdiff
path: root/modules/profile/profile.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2004-09-19 13:33:08 +0000
committerDries Buytaert <dries@buytaert.net>2004-09-19 13:33:08 +0000
commit2b9aaf715977c11e8a71e91b5898f65ff98e4b3e (patch)
tree5d17a43bfe3b38b352d0ba80179d2f8b0718f411 /modules/profile/profile.module
parent6dbd0bcfb4c79853ca1402d9f85a325853b01411 (diff)
downloadbrdo-2b9aaf715977c11e8a71e91b5898f65ff98e4b3e.tar.gz
brdo-2b9aaf715977c11e8a71e91b5898f65ff98e4b3e.tar.bz2
- Bugfix: making changes to the user profiles should flush the cache.
Diffstat (limited to 'modules/profile/profile.module')
-rw-r--r--modules/profile/profile.module7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/profile/profile.module b/modules/profile/profile.module
index c31c21c57..d4e1bb595 100644
--- a/modules/profile/profile.module
+++ b/modules/profile/profile.module
@@ -443,6 +443,8 @@ function profile_admin_add($type) {
if (!form_get_errors()) {
db_query("INSERT INTO {profile_fields} (title, name, explanation, category, type, weight, required, register, visibility, options, page) VALUES ('%s', '%s', '%s', '%s', '%s', %d, %d, %d, %d, '%s', '%s')", $data['title'], $data['name'], $data['explanation'], $data['category'], $type, $data['weight'], $data['required'], $data['register'], $data['visibility'], $data['options'], $data['page']);
+ cache_clear_all();
+
drupal_set_message(t('The field has been created.'));
drupal_goto('admin/user/configure/profile');
}
@@ -468,6 +470,8 @@ function profile_admin_edit($fid) {
if (!form_get_errors()) {
db_query("UPDATE {profile_fields} SET title = '%s', name = '%s', explanation = '%s', category = '%s', weight = %d, required = %d, register = %d, visibility = %d, options = '%s', page = '%s' WHERE fid = %d", $data['title'], $data['name'], $data['explanation'], $data['category'], $data['weight'], $data['required'], $data['register'], $data['visibility'], $data['options'], $data['page'], $fid);
+ cache_clear_all();
+
drupal_set_message(t('The field has been updated.'));
drupal_goto('admin/user/configure/profile');
}
@@ -484,6 +488,9 @@ function profile_admin_edit($fid) {
*/
function profile_admin_delete($fid) {
db_query('DELETE FROM {profile_fields} WHERE fid = %d', $fid);
+
+ cache_clear_all();
+
drupal_set_message(t('The field has been deleted.'));
drupal_goto('admin/user/configure/profile');
}