Php working on LDAP

Alles, was PHP betrifft, kann hier besprochen werden.

Php working on LDAP

Postby juanferaviles » 08. June 2018 17:32

Hi in this site; https://samjlevy.com/php-ldap-login/ there is a LDAP php code to login ... I need to know Which lines have to modify to just give access to various groups without chkecking between managers and users?
Tks a lot. I´ve tryed some few changes but nothing works for me to do that , because original script is programmed to validate a group manager and a group user between, but i dont want that, i want just login with various groups.
juanferaviles
 
Posts: 8
Joined: 05. June 2018 15:22
XAMPP version: 3.2.2
Operating System: Sercer 2012 R2

Re: Php working on LDAP

Postby TonyVier » 09. June 2018 07:18

This:

Code: Select all
if($_SESSION['access'] != 2) {
   // another example...
   // user is logged in but not a manager, let's stop him
   die("Access Denied");
}


checks for manager rights, remove that in protected.php
TonyVier
 
Posts: 43
Joined: 24. May 2018 11:22
XAMPP version: 7.2.5-0
Operating System: Windows 10 pro

Re: Php working on LDAP

Postby juanferaviles » 12. June 2018 16:36

TonyVier wrote:This:

Code: Select all
if($_SESSION['access'] != 2) {
   // another example...
   // user is logged in but not a manager, let's stop him
   die("Access Denied");
}


checks for manager rights, remove that in protected.php

Tks, im gonna try it. By the way, tks a lot for te ssl certificate post, very good im going to try it.
juanferaviles
 
Posts: 8
Joined: 05. June 2018 15:22
XAMPP version: 3.2.2
Operating System: Sercer 2012 R2


Return to PHP

Who is online

Users browsing this forum: No registered users and 31 guests