From 0abb1641da80c6780551701de3f75dc071f9bab6 Mon Sep 17 00:00:00 2001 From: docwilmot Date: Mon, 29 Jul 2019 21:58:08 -0500 Subject: [PATCH] Fix access callback for tabbed profiles --- profile.module | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/profile.module b/profile.module index fc2ac78..7f7f72c 100644 --- a/profile.module +++ b/profile.module @@ -233,7 +233,10 @@ function profile_user_edit_access($account, $type_name) { } $profile = profile_load_by_user($account, $type_name); - if ($profile && profile_access('update', $profile, $account)) { + if (empty($profile)) { + $profile = profile_create(array('type' => $type_name, 'uid' => $account->uid)); + } + if (profile_access('edit', $profile, $account)) { return TRUE; }