@@ -1226,7 +1226,7 @@ public function testSyncUser()
1226
1226
public function testLdapAuth ()
1227
1227
{
1228
1228
//try to log in from a user that does not exist yet
1229
- $ auth = $ this ->login ('brazil6 ' , 'password ' , false );
1229
+ $ auth = $ this ->realLogin ('brazil6 ' , 'password ' , false );
1230
1230
1231
1231
$ user = new \User ();
1232
1232
$ user ->getFromDBbyName ('brazil6 ' );
@@ -1266,7 +1266,7 @@ public function testLdapAuth()
1266
1266
$ this ->assertSame ('brazil7 ' , $ user ->fields ['name ' ]);
1267
1267
$ this ->assertSame ('uid=brazil7,ou=people,ou=R&D,dc=glpi,dc=org ' , $ user ->fields ['user_dn ' ]);
1268
1268
1269
- $ auth = $ this ->login ('brazil7 ' , 'password ' , false , true );
1269
+ $ auth = $ this ->realLogin ('brazil7 ' , 'password ' , false , true );
1270
1270
1271
1271
$ this ->assertTrue ($ auth ->user_present );
1272
1272
$ this ->assertSame ($ user ->fields ['user_dn ' ], $ auth ->user_dn );
@@ -1283,8 +1283,8 @@ public function testLdapAuth()
1283
1283
)
1284
1284
);
1285
1285
1286
- $ this ->login ('brazil7 ' , 'password ' , false , false );
1287
- $ auth = $ this ->login ('brazil7test ' , 'password ' , false );
1286
+ $ this ->realLogin ('brazil7 ' , 'password ' , false , false );
1287
+ $ auth = $ this ->realLogin ('brazil7test ' , 'password ' , false );
1288
1288
1289
1289
//reset entry before any test can fail
1290
1290
$ this ->assertTrue (
@@ -1322,7 +1322,7 @@ public function testLdapAuth()
1322
1322
(int ) $ user ->add ($ dup )
1323
1323
);
1324
1324
1325
- $ auth = $ this ->login ('brazil6 ' , 'password ' , false );
1325
+ $ auth = $ this ->realLogin ('brazil6 ' , 'password ' , false );
1326
1326
$ this ->assertSame ($ aid , $ auth ->user ->fields ['auths_id ' ]);
1327
1327
$ this ->assertSame ('brazil6 ' , $ auth ->user ->fields ['name ' ]);
1328
1328
$ this ->assertSame ('uid=brazil6,ou=people,ou=R&D,dc=glpi,dc=org ' , $ auth ->user ->fields ['user_dn ' ]);
@@ -2305,7 +2305,7 @@ public function testRuleRight()
2305
2305
]);
2306
2306
2307
2307
// login the user to force a real synchronisation and get it's glpi id
2308
- $ this ->login ('brazil6 ' , 'password ' , false );
2308
+ $ this ->realLogin ('brazil6 ' , 'password ' , false );
2309
2309
$ users_id = \User::getIdByName ('brazil6 ' );
2310
2310
$ this ->assertGreaterThan (0 , $ users_id );
2311
2311
// check the user got the entity/profiles assigned
@@ -2389,7 +2389,7 @@ public function testGroupRuleRight()
2389
2389
])->getID ();
2390
2390
2391
2391
// login the user to force a real synchronisation and get it's glpi id
2392
- $ this ->login ('brazil6 ' , 'password ' , false );
2392
+ $ this ->realLogin ('brazil6 ' , 'password ' , false );
2393
2393
$ users_id = \User::getIdByName ('brazil6 ' );
2394
2394
$ this ->assertGreaterThan (0 , $ users_id );
2395
2395
@@ -2408,7 +2408,7 @@ public function testGroupRuleRight()
2408
2408
]);
2409
2409
2410
2410
// Login
2411
- $ this ->login ('brazil6 ' , 'password ' , false );
2411
+ $ this ->realLogin ('brazil6 ' , 'password ' , false );
2412
2412
$ users_id = \User::getIdByName ('brazil6 ' );
2413
2413
$ this ->assertGreaterThan (0 , $ users_id );
2414
2414
@@ -2452,7 +2452,7 @@ public function testGroupRuleRight()
2452
2452
]);
2453
2453
2454
2454
// Login
2455
- $ this ->login ('brazil6 ' , 'password ' , false );
2455
+ $ this ->realLogin ('brazil6 ' , 'password ' , false );
2456
2456
$ users_id = \User::getIdByName ('brazil6 ' );
2457
2457
$ this ->assertGreaterThan (0 , $ users_id );
2458
2458
@@ -2493,7 +2493,7 @@ public function testRuleRightGroupCriteria()
2493
2493
$ this ->createRule ($ builder );
2494
2494
2495
2495
// login the user to force a real synchronisation (and creation into DB)
2496
- $ this ->login ('brazil7 ' , 'password ' , false );
2496
+ $ this ->realLogin ('brazil7 ' , 'password ' , false );
2497
2497
$ users_id = \User::getIdByName ('brazil7 ' );
2498
2498
2499
2499
// Add group to user
@@ -2510,7 +2510,7 @@ public function testRuleRightGroupCriteria()
2510
2510
$ this ->assertCount (0 , $ rights );
2511
2511
2512
2512
// Log in again to trigger rule
2513
- $ this ->login ('brazil7 ' , 'password ' , false );
2513
+ $ this ->realLogin ('brazil7 ' , 'password ' , false );
2514
2514
2515
2515
// Check that the correct profile was set
2516
2516
$ rights = (new Profile_User ())->find ([
@@ -2525,7 +2525,7 @@ public function testRuleRightGroupCriteria()
2525
2525
public function testLdapUnavailable ()
2526
2526
{
2527
2527
//Import user that doesn't exist yet
2528
- $ auth = $ this ->login ('brazil5 ' , 'password ' , false );
2528
+ $ auth = $ this ->realLogin ('brazil5 ' , 'password ' , false );
2529
2529
2530
2530
$ user = new \User ();
2531
2531
$ user ->getFromDBbyName ('brazil5 ' );
@@ -2551,7 +2551,7 @@ public function testLdapUnavailable()
2551
2551
])
2552
2552
);
2553
2553
2554
- $ this ->login ('brazil5 ' , 'password ' , false , false );
2554
+ $ this ->realLogin ('brazil5 ' , 'password ' , false , false );
2555
2555
$ this ->hasPhpLogRecordThatContains (
2556
2556
"Unable to bind to LDAP server `openldap:1234` with RDN `cn=Manager,dc=glpi,dc=org` \nerror: Can't contact LDAP server (-1) " ,
2557
2557
LogLevel::WARNING
@@ -2588,7 +2588,7 @@ public function testLdapDeletionOnLogin()
2588
2588
);
2589
2589
2590
2590
//Import user that doesn't exist yet
2591
- $ auth = $ this ->login ('logintest ' , 'password ' );
2591
+ $ auth = $ this ->realLogin ('logintest ' , 'password ' );
2592
2592
2593
2593
$ user = new \User ();
2594
2594
$ user ->getFromDBbyName ('logintest ' );
@@ -2665,7 +2665,7 @@ public function testIgnoreImport()
2665
2665
'value ' => '1 ' , // Reject
2666
2666
]);
2667
2667
// login the user to force synchronisation
2668
- $ this ->login ('brazil6 ' , 'password ' , false , false );
2668
+ $ this ->realLogin ('brazil6 ' , 'password ' , false , false );
2669
2669
2670
2670
// Check title not created
2671
2671
$ ut = new UserTitle ();
0 commit comments