65 lines
2.4 KiB
HTML
65 lines
2.4 KiB
HTML
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||
|
<html>
|
||
|
<head>
|
||
|
<title>Developer FAQ</title>
|
||
|
<link rel="stylesheet" type="text/css" href="style/layout.css">
|
||
|
</head>
|
||
|
<body>
|
||
|
<div style="text-align: center;">
|
||
|
<h1>Developer FAQ<br>
|
||
|
</h1>
|
||
|
<br>
|
||
|
<div style="text-align: left;"><big><span style="font-weight: bold;">Q:
|
||
|
Where is the ldap/config object?</span></big><br>
|
||
|
<br>
|
||
|
<big><span style="font-weight: bold;">A:</span></big> The ldap object
|
||
|
is in <span style="color: rgb(204, 0, 0); font-weight: bold;">$_SESSION['ldap']</span>
|
||
|
and the config object in <span
|
||
|
style="font-weight: bold; color: rgb(204, 0, 0);">$_SESSION['config']</span>.<br>
|
||
|
<br>
|
||
|
<br>
|
||
|
</div>
|
||
|
<div style="text-align: left;"><br>
|
||
|
</div>
|
||
|
<div style="text-align: left;"><big><span style="font-weight: bold;">Q:
|
||
|
How can I make LDAP operations, where is the user name and password?</span></big><br>
|
||
|
<br>
|
||
|
<span style="font-weight: bold;"><big>A:</big> </span>LAM
|
||
|
automatically reconnects to the LDAP server on every page load. You can
|
||
|
use <span style="font-weight: bold; color: rgb(204, 0, 0);">$_SESSION['ldap']->server</span>
|
||
|
which is the LDAP server handle.<br>
|
||
|
Be sure to include ldap.inc before (automatically included for account
|
||
|
modules).<br>
|
||
|
<br>
|
||
|
<span style="font-weight: bold;">Example:</span> ldap_search(<span
|
||
|
style="font-weight: bold; color: rgb(204, 0, 0);">$_SESSION['ldap']->server</span><span
|
||
|
style="color: rgb(204, 0, 0);"></span>, $suffix, $filter, $attributes)<br>
|
||
|
<br>
|
||
|
<br>
|
||
|
<br>
|
||
|
<big><span style="font-weight: bold;">Q: What is the LDAP suffix for
|
||
|
the different account types?</span></big><br>
|
||
|
<br>
|
||
|
<big><span style="font-weight: bold;">A:</span></big> Just call <span
|
||
|
style="font-weight: bold; color: rgb(204, 0, 0);">$_SESSION['config']->get_Suffix($scope)</span>
|
||
|
where $scope is the account type (user,group, ...).<br>
|
||
|
Be sure to include ldap.inc before (automatically included for account
|
||
|
modules).<br>
|
||
|
<br>
|
||
|
<span style="font-weight: bold;">Example:</span> $suffix = <span
|
||
|
style="font-weight: bold; color: rgb(204, 0, 0);">$_SESSION['config']->get_Suffix('user')</span><br>
|
||
|
<br>
|
||
|
<br>
|
||
|
<br>
|
||
|
<big><span style="font-weight: bold;">Q: How can I check if the user is
|
||
|
really logged in and not calling the scripts by hand?</span></big><br>
|
||
|
<br>
|
||
|
<big><span style="font-weight: bold;">A:</span></big> After the user
|
||
|
successfully logged in to LAM the variable <span
|
||
|
style="font-weight: bold; color: rgb(204, 0, 0);">$_SESSION['loggedIn']</span>
|
||
|
is set to true.<br>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|