PHP Booosta 3 Tutorial
PHP Booosta 3 Tutorial
User registration
The first user we have created in the admin area. Booosta also provides
a way for users to register themselves. In the installer you can
choose, if this should be possible or not. You can change this after
the installation in the central config file of Booosta, which is
local/config.incl.php:
<?php
namespace booosta;
Framework::$CONFIG = [
'site_name' => 'My Test Application',
'allow_registration' => true,
'confirm_registration' => true,
'mcrypt_keyfile' => 'local/key.php',
'language' => 'en',
'db_module' => 'mysqli',
'db_hostname' => 'localhost',
'db_user' => 'myuser',
'db_password' => 'mypassword',
'db_database' => 'mydb',
'mail_sender' => 'me@example.com',
'mail_backend' => 'php',
'mail_smtp_params' => [ 'host' => 'smtp.example.com', 'auth' => true, 'username' => '', 'password' => '' ],
'use_edit_delete_pics' => true,
'edit_pic_code' => '<span class="glyphicon text-default glyphicon-pencil" aria-hidden="true" data-toggle="tooltip" data-placement="right" title="edit"></span>',
'delete_pic_code' => '<span class="glyphicon text-danger glyphicon-remove" aria-hidden="true" data-toggle="tooltip" data-placement="right" title="delete"></span>',
'always_load_jquery' => true,
# usually you do not need to change anything beyond this line
'DEBUG_MODE' => false,
'LOG_MODE' => false,
'BACKUPMODE' => false,
'serial_field' => ['usersettings'],
'ESCAPE_CURL' => false,
'NO_DBCONNECT' => false,
];
?>
In these config file you find most of the settings you selected in the
installer. "allow_registration" allows users to register themselves
with the system. "confirm_registration" sends out a confirmation email
to the user with a secret link that is used to enable the created
account. As long as the new user has not clicked on this link the
account stays disabled. Of course an administrator can enable this
account when edititg that user.
So let us be a foreign person and create an account for our online
colleague... New and existing users have to be pointed to
lib/modules/usersystem/login_user.php:

You can see the "Register" link an click on it...

Choose a username and a password and provide you email address. If you
enabled user confirmation it has to be a working email address. After a
short time you should find the confirmation email in your mailbox. If
not, you should check if your webserver is able to send emails. You can
try to change the mail sending method to "sendmail" or "SMTP". With
SMTP you must provide the server and probably a valid username and
password in the config file.
After that you can login with the new user account. If it does not
work, be sure you have clicked on the link in the confirmation email
you got. If it still does not work log in as administrator
(login_adminuser.php) again and see, if the user is existing and
enabled. You also can try to reset the users password there. If you
still fail, look in the manual if your server meets all requirements
for Booosta. Especially the enabled mcrypt PHP module.
Previous -
Next