google-code-export / candydolldb

Automatically exported from code.google.com/p/candydolldb
0 stars 0 forks source link

UpdateUser not working in update script when using v1.5 #40

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install a fresh v1.5
2. Copy all current files from trunk into the v1.5 folder
3. Navigate to setup_v1x_to_v18.php and click 'yes'

What is the expected output? What do you see instead?
One would expect that all updates are processed normally. Yet, the updating of 
the Admin's rights fails.

While debugging this issue, it seems that the User::Update() fails to do its 
job, regardless of its return status (TRUE). One can put more than just the 
Rights update into the $admUser (for example ->setFirstName('FooBar'), it still 
does not update in the DB.

Original issue reported on code.google.com by fwp...@gmail.com on 19 Oct 2012 at 10:04

GoogleCodeExporter commented 9 years ago
It seems that this behavior does not occur when the setup.php from v1.5 is 
altered to use a different database-name. When one changes 'candydolldb' to 
'candy15', the update to v1.8 works as expected.

Strange...

Original comment by fwp...@gmail.com on 20 Oct 2012 at 8:44

GoogleCodeExporter commented 9 years ago
Debugging the call to User::Update(), $dbi->info shows that all is well:
Rows matched: 1 Changed: 1 Warnings: 0

If I place a User::GetUsers() right after the update, the admin-user does have 
the new rights.

Original comment by fwp...@gmail.com on 23 Oct 2012 at 11:06

GoogleCodeExporter commented 9 years ago
I place a call to User::GetUsers() right before the redirect to login.php, 
die(). All is well, the admin-user has full rights.

Then, i place the exact same call after the include(cd.php) in login.php, 
die(). There, the admin-user has no rights at all.

Meanwhile, I view the table's content in PHPMyAdmin, it stays empty all the 
while. What is going on?

Original comment by fwp...@gmail.com on 23 Oct 2012 at 11:28

GoogleCodeExporter commented 9 years ago
Comment 1 is not valid, have retried and it fails, too.

Original comment by fwp...@gmail.com on 23 Oct 2012 at 11:29

GoogleCodeExporter commented 9 years ago
Fixed in r765.

Original comment by fwp...@gmail.com on 23 Oct 2012 at 5:33