View Issue Details

IDProjectCategoryView StatusLast Update
0014466mantisbtdb postgresqlpublic2014-09-23 18:05
Reportermva Assigned Todregad  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version1.2.11 
Target Version1.2.12Fixed in Version1.2.12 
Summary0014466: New Signup user has protected account
Description

If user sign up, receiveed email and go to ling then get error 'Account protected'.

Problem in file user_api.php>>function user_create line 483

exists

if( $c_protected ) {
user_set_field( $t_user_id, 'protected', 1 );
}

correct

if( $p_protected ) {
user_set_field( $t_user_id, 'protected', 1 );
}

TagsNo tags attached.

Relationships

related to 0014288 closeddregad Manage User not reachable due to error in PostgreSQL 
related to 0013713 closeddregad Upgrade ADOdb library to latest version 
related to 0015721 closedgrangeway Functionality to consider porting to master-2.0.x 

Activities

atrol

atrol

2012-07-09 09:51

developer   ~0032281

Which database do you use?

mva

mva

2012-07-09 10:37

reporter   ~0032282

PostgreSQL

dregad

dregad

2012-07-09 22:28

developer   ~0032285

This is probably a side effect of 0014288 - will have a look.

Note: removing relationship to 0014398 which deals with issues related to 1.3, not the case here

atrol

atrol

2012-07-10 01:30

developer   ~0032288

dregad, you set the same relationship at 0014385. So I thought it is a good idea to add it also here.
I added better relationship 0013713 to collect test cases when introducing a new version of ADOdb.

mva

mva

2012-07-10 01:42

reporter   ~0032289

Hm-m, on my opinion error in php code and indpendentd from database platform.

At user_api.php line 457

$c_protected = db_prepare_bool( $p_protected );

$c_protected always has value!

At user_api.php line 457

if( $c_protected ) {
    user_set_field( $t_user_id, 'protected', 1 );
}

Always set new user to protected state!

I'm sorry if this note was unnecessary

atrol

atrol

2012-07-10 01:47

developer   ~0032290

I had a bad gut feeling when seeing this commit.

This is probably a side effect of 0014288 - will have a look.
<smartass>Dealing with systems instead of the root cause is no good ideas most of the time</smartass>

Our real problem is, that we don't have enough automated tests to make such kind of changes without fearing to break existing functionality.

atrol

atrol

2012-07-10 01:50

developer   ~0032291

mva, if( $c_protected ) doesn't mean "has a value" it means "is true"

grangeway

grangeway

2013-04-05 17:56

reporter   ~0036154

Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch

grangeway

grangeway

2014-05-16 15:02

reporter   ~0040516

MantisBT currently supports Mysql and has support for other database engines.

The support for other databases is known to be problematic.

Having implemented the current database layer into Mantis 10 years ago, I'm currently working on replacing the current layer.

If you are interested in using Mantis with non-mysql databases - for example, Oracle, PGSQL or MSSQL, and would be willing to help out testing the new database layer, please drop me an email at paul@mantisforge.org

In the meantime, I'd advise running Mantis with Mysql Only to avoid issues.

Thanks
Paul

Related Changesets

MantisBT: master d9e97d9e

2012-08-01 13:34

dregad


Details Diff
Fix new signup user is protected account on PostgreSQL

This fixes a regression introduced with resolution of 0014288 (see commit
b8d4b5039598248d0b0c78619450c51d4dc98df2)

The user_create() function was not properly resetting the account's
protected flag to false due to specific handling of Boolean type as a
string for PostgreSQL.

Fixes 0014466
Affected Issues
0014466
mod - core/user_api.php Diff File

MantisBT: master-1.2.x 7124ee6f

2012-08-01 13:34

dregad


Details Diff
Fix new signup user is protected account on PostgreSQL

This fixes a regression introduced with resolution of 0014288 (see commit
b8d4b5039598248d0b0c78619450c51d4dc98df2)

The user_create() function was not properly resetting the account's
protected flag to false due to specific handling of Boolean type as a
string for PostgreSQL.

Fixes 0014466
Affected Issues
0014466
mod - core/user_api.php Diff File