2003-06-13 14:38:42 +00:00
|
|
|
<?php
|
|
|
|
/*
|
|
|
|
$Id$
|
|
|
|
|
|
|
|
This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam)
|
|
|
|
Copyright (C) 2003 Roland Gruber
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more detaexils.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
|
2003-09-15 16:29:57 +00:00
|
|
|
This page will redirect to account/useredit.php if the given user is valid.
|
2003-06-13 14:38:42 +00:00
|
|
|
It is called from listgroups.php via the memberUID links.
|
|
|
|
|
|
|
|
*/
|
|
|
|
include_once ("../../lib/ldap.inc");
|
|
|
|
include_once ("../../lib/status.inc");
|
|
|
|
|
|
|
|
// start session
|
|
|
|
session_save_path("../../sess");
|
|
|
|
@session_start();
|
|
|
|
|
|
|
|
setlanguage();
|
|
|
|
|
|
|
|
// get user name
|
|
|
|
$user = $_GET['user'];
|
|
|
|
$user = str_replace("\'", '',$user);
|
|
|
|
|
|
|
|
// get DN of user
|
|
|
|
$dn = $_SESSION['ldap']->search_username($user);
|
|
|
|
|
|
|
|
if ($dn) {
|
2003-09-15 16:29:57 +00:00
|
|
|
// redirect to account/useredit.php
|
|
|
|
metaRefresh("../account/useredit.php?type=user&DN='$dn'");
|
2003-06-13 14:38:42 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
// print error message if user was not found
|
2003-07-29 11:52:26 +00:00
|
|
|
echo $_SESSION['header'];
|
2003-06-13 14:38:42 +00:00
|
|
|
echo "<html><head><title>userlink</title>\n";
|
|
|
|
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../../style/layout.css\">\n";
|
|
|
|
echo "</head><body>\n";
|
2003-07-27 14:20:39 +00:00
|
|
|
StatusMessage("ERROR", "", _("This user was not found!") . " (" . $user . ")");
|
2003-07-27 14:26:10 +00:00
|
|
|
echo "<p> </p>";
|
|
|
|
echo "<p><a href=\"listgroups.php\">" . _("Back to group list") . "</a></p>";
|
2003-06-13 14:38:42 +00:00
|
|
|
echo ("</body></html>\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|