mirror of
https://github.com/LDAPAccountManager/lam.git
synced 2025-10-03 09:49:16 +02:00
added support for deleting profiles
This commit is contained in:
parent
f9687ffc6f
commit
958882cce6
1 changed files with 18 additions and 0 deletions
|
@ -365,4 +365,22 @@ function saveHostProfile($account, $profile) {
|
||||||
fclose($file);
|
fclose($file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// deletes a user profile
|
||||||
|
function delUserProfile($file) {
|
||||||
|
if (!eregi("^([0-9]|[a-z]|-|_)*$", $profile)) exit;
|
||||||
|
$prof = substr(__FILE__, 0, strlen(__FILE__) - 16) . "config/profiles/users/".$file.".pru";
|
||||||
|
if (is_file($prof)) {
|
||||||
|
return @unlink($prof);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// deletes a host profile
|
||||||
|
function delHostProfile($file) {
|
||||||
|
if (!eregi("^([0-9]|[a-z]|-|_)*$", $profile)) exit;
|
||||||
|
$prof = substr(__FILE__, 0, strlen(__FILE__) - 16) . "config/profiles/hosts/".$file.".prh";
|
||||||
|
if (is_file($prof)) {
|
||||||
|
return @unlink($prof);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue