Ejemplo n.º 1
0
<? require_once("config.php"); ?>
<? require_once(RESACCMAN_BASE."/classes/SecurityUser.php"); ?>
<? require_once(RESACCMAN_BASE."/classes/Text.php"); ?>
<?

$u = SecurityUser::getById($id);
if ($u == NULL) {
    $errMsg = Text::getText("MissingUser");
    include("error.php");
    exit;
}

if ($action == "save") {
    if (strlen($loginName) > 0) {
        $u->setLoginName($loginName);
        $u->setFullName($fullName);
        if ($changePassword == "true") {
            $u->setPassword($password);
        }
        $u->save();
        header("Location: users.php");
    } else {
        $errMsg = Text::getText("MissingLoginName");
        $buttonCaption = Text::getText("Save");
        include("header.php");
        include("userEditForm.php");
        include("footer.php");
    }
} else {
    $title = Text::getText("EditUser");
    $buttonCaption = Text::getText("Save");
Ejemplo n.º 2
0
 function getAuthor() {
     if ($this->authorId == NULL) {
         return NULL;
     } else {
         return SecurityUser::getById($this->authorId);
     }
 }
Ejemplo n.º 3
0
 function getUser() {
     if ($this->user == NULL) {
         if ($this->user_id == NULL) {
             return NULL;
         } else {
             $this->user = SecurityUser::getById($this->user_id);
             return $this->user;
         }
     } else {
         return $this->user;
     }
 }
Ejemplo n.º 4
0
<? require_once("classes/SecurityUser.php"); ?>
<? require_once("classes/Text.php"); ?>
<?
    $group_id = $_REQUEST['group'];
    $user_id = $_REQUEST['user'];

    $g = SecurityGroup::getById($group_id);

    if ($g == NULL) {
        $errMsg = Text::getText("GroupNotFound");
        $title = Text::getText("Delete");
        include("error.php");
    } else {
        $u = SecurityUser::getById($user_id);
        if ($u == NULL) {
            $errMsg = Text::getText("UserNotFound");
            $title = Text::getText("Delete");
            include("error.php");
        } else {
            $g->addMember($u);
            header("Location: groupMembers.php?id=".$g->getId());
        }
    }
?>
Ejemplo n.º 5
0
<? require_once("classes/SecurityUser.php"); ?>
<? require_once("classes/Text.php"); ?>
<?
    $u = SecurityUser::getById($_REQUEST['id']);
    if ($u == NULL) {
        $errMsg = Text::getText("UserNotFound");
        $title = Text::getText("Delete");
        include("error.php");
    } else {
        $u->delete();
        header("Location: users.php");
    }
?>