Error: unconfirmed user permission refresh

taubes

Member
Hi

I have a problem with user permissions. I have a "public" registration page that is a view from dadabik's user table and it has worked well in the past. It got broken with a recent dadabik update but I cannot pin-point which update exactly but probably linked to the new self-registration features. The "registration" view only has "create" permissions. When a new record entered I get the error message "Error: unconfirmed user permission refresh".

The form contains a username_user field and is can set this as text or ID_user getting the same error. During validation I can confirm that the $_SESSION['logged_user_infos_ar']['id_group'] is the public group. In the form the group gets changed to a non-public group via a default value.

$enable_users_self_registration = 0; (1 and 0 makes no difference)
$default_group_user_self_registration = 2; (should not be relevant ?? if self registration is 0)
$username_public_user = 'public';

Any ideas?

You are using DaDaBIK version 11.8-Elba platinum, installed on Feb 23, 2023
PHP Version: 7.4.30
mysql version: 5.5.5-10.3.32-MariaDB
Web server: Apache/2.4.54 (Unix)
 

eugenio

Administrator
Staff member
Hi,
yes you are right the self registration feature added some additional fields to the users table, in particular confirmed_timestamp_user is used to verify if the user confirmed their registration via email.
When a user is added by the admin, DaDaBIK set confirmed_timestamp_user to time() (the current timestamp) so the user is automatically confirmed. You should do the same when you insert through the VIEW, adding your code in an AFTER INSERT hook.

Best,
 
Top