- RyanAsked on February 02, 2012 at 01:36 PM
We've purchased the basic license to be installed on our servers. We have come across a problem adding new users to the system.
The problem only exists when the default user type is guest as opposed to the others. We've traced it back to a particular code block that I'll share below:
Within ConfigsClass.php the following constant is defined:
const DEFAULT_USER_TYPE = "GUEST";
I've traced the code to User::registerNewUser within lib/classes/User.php
Within this function, it does successfully create the account $result = $u->save(); (Line:1210). According to the mysql bin log, it does insert the record in the database.
The problem starts on Line:1228 of the above function. After the DB responds with a success message, the code proceeds to run the following: Session::claimGuestAccount($u->username);
I don't quite understand the purpose of this function. When you inspect the code, it goes through and proceeds to delete all of the guest accounts in the database. Thus deleting the newly created account implemented 20ish lines above.
Is this a bug? What's the thought process behind Session::claimGuestAccount?
- fxrAnswered on February 02, 2012 at 06:05 PM
Please send licensing related questions to email@example.com