Jump to content

User Account Creation Question


KaraCooma

Recommended Posts

Hello,

I've been working on a project that utilizes prestashop. I've been trying to find the script handling the process of creating user accounts.

I found this in authentication.php

/* Call a hook to display more information on form */
$smarty->assign(array('HOOK_CREATE_ACCOUNT_FORM' => Module::hookExec('createAccountForm')

I can't find this module in my presta directory. I want to find out how prestashop inserts new accounts into its database.

Can anyone help?

Thanks.

Anthony

Link to comment
Share on other sites

The code you listed is not for creating user account. It is hook to call other related modules after a new user account is created. The code that add user account to database is the first line of following

       if (!$customer->add())
           $errors[] = Tools::displayError('an error occurred while creating your account');



actually the real code is "$customer->add() ".

If you want see further code, go find add() in /classes/Customer.php
and /classes/ObjectModel.php
and /Db.php

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...