ProjetosController.php
1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Adldap\Contracts\AdldapInterface;
use App\Projetos;
class ProjetosController extends Controller
{
protected $adldap;
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct(AdldapInterface $adldap)
{
$this->adldap = $adldap;
}
/**
* Displays the all LDAP users.
*
* @return \Illuminate\View\View
*/
public function index()
{
$users = $this->adldap->getDefaultProvider()->search()->users()->find('emerson');
$users = $this->adldap->getDefaultProvider()->search()->where('sn','=','*warley*')->get();
/*if($this->adldap->user()->inGroup($username,"SIRKit Staff")) {
$ldap_user_info = $this->adldap->user()->info($username);
$ldap_user_name = $ldap_user_info[0]["displayname"][0];
}*/
dd($users);
//dd($ldap_user_name);*/
//$users = $this->adldap->getDefaultProvider()->groups("1674170")->get();
//dd($users);
//$projeto = Projetos::orderBy('id', 'desc')->paginate(10);
//return view('index2')->withProjetos($projeto);
return view('index2', compact('users'));
}
}