コード例 #1
0
function initializeGui()
{
    $gui = new stdClass();
    $gui->external_password_mgmt = tlUser::isPasswordMgtExternal();
    $gui->page_title = lang_get('page_title_lost_passwd');
    $gui->note = lang_get('your_info_for_passwd');
    return $gui;
}
コード例 #2
0
ファイル: firstLogin.php プロジェクト: JacekKarwas/smutek
                }
                logAuditEvent(TLS("audit_users_self_signup", $args->login), "CREATE", $user->dbID, "users");
                redirect(TL_BASE_HREF . "login.php?note=first");
                exit;
            } else {
                $message = getUserErrorMessage($result);
            }
        } else {
            $message = $rx['msg'];
        }
    }
}
$smarty = new TLSmarty();
$gui = $args;
// we get info about THE DEFAULT AUTHENTICATION METHOD
$gui->external_password_mgmt = tlUser::isPasswordMgtExternal();
$gui->message = $message;
$smarty->assign('gui', $gui);
$smarty->display($templateCfg->default_template);
/**
 * get input from user and return it in some sort of namespace
 *
 */
function init_args()
{
    $iParams = array("doEditUser" => array(tlInputParameter::STRING_N, 0, 1), "login" => array(tlInputParameter::STRING_N, 0, 30), "password" => array(tlInputParameter::STRING_N, 0, 32), "password2" => array(tlInputParameter::STRING_N, 0, 32), "firstName" => array(tlInputParameter::STRING_N, 0, 30), "lastName" => array(tlInputParameter::STRING_N, 0, 30), "email" => array(tlInputParameter::STRING_N, 0, 100));
    $args = new stdClass();
    P_PARAMS($iParams, $args);
    return $args;
}
/**
コード例 #3
0
$gui = new stdClass();
$gui->external_password_mgmt = 0;
$gui->page_title = lang_get('page_title_lost_passwd');
$gui->note = lang_get('your_info_for_passwd');
$gui->password_mgmt_feedback = '';
$op = doDBConnect($db, database::ONERROREXIT);
$userID = false;
if ($args->login != "") {
    $userID = tlUser::doesUserExist($db, $args->login);
    if (!$userID) {
        $gui->note = lang_get('bad_user');
    } else {
        // need to know if auth method for user allows reset
        $user = new tlUser(intval($userID));
        $user->readFromDB($db);
        if (tlUser::isPasswordMgtExternal($user->authentication, $user->authentication)) {
            $gui->external_password_mgmt = 1;
            $gui->password_mgmt_feedback = sprintf(lang_get('password_mgmt_feedback'), trim($args->login));
        }
    }
}
if (!$gui->external_password_mgmt && $userID) {
    echo __LINE__;
    $result = resetPassword($db, $userID);
    $gui->note = $result['msg'];
    if ($result['status'] >= tl::OK) {
        $user = new tlUser($userID);
        if ($user->readFromDB($db) >= tl::OK) {
            logAuditEvent(TLS("audit_pwd_reset_requested", $user->login), "PWD_RESET", $userID, "users");
        }
        redirect(TL_BASE_HREF . "login.php?note=lost");
コード例 #4
0
ファイル: usersEdit.php プロジェクト: mokal/DCN_TestLink
        break;
    case "create":
    default:
        $highlight->create_user = 1;
        $user = new tlUser();
        break;
}
$gui->op->operation = $actionOperation[$args->doAction];
$roles = tlRole::getAll($db, null, null, null, tlRole::TLOBJ_O_GET_DETAIL_MINIMUM);
unset($roles[TL_ROLES_UNDEFINED]);
$smarty = new TLSmarty();
$smarty->assign('gui', $gui);
$smarty->assign('highlight', $highlight);
$smarty->assign('operation', $gui->op->operation);
$smarty->assign('user_feedback', $gui->op->user_feedback);
$smarty->assign('external_password_mgmt', tlUser::isPasswordMgtExternal($user->authentication));
$smarty->assign('mgt_view_events', $_SESSION['currentUser']->hasRight($db, "mgt_view_events"));
$smarty->assign('grants', getGrantsForUserMgmt($db, $_SESSION['currentUser']));
$smarty->assign('optRights', $roles);
$smarty->assign('userData', $user);
renderGui($smarty, $args, $templateCfg);
/**
 * 
 *
 */
function init_args()
{
    $_REQUEST = strings_stripSlashes($_REQUEST);
    $iParams = array("delete" => array(tlInputParameter::INT_N), "user" => array(tlInputParameter::INT_N), "user_id" => array(tlInputParameter::INT_N), "rights_id" => array(tlInputParameter::INT_N), "doAction" => array(tlInputParameter::STRING_N, 0, 30), "firstName" => array(tlInputParameter::STRING_N, 0, 30), "lastName" => array(tlInputParameter::STRING_N, 0, 100), "emailAddress" => array(tlInputParameter::STRING_N, 0, 100), "locale" => array(tlInputParameter::STRING_N, 0, 10), "login" => array(tlInputParameter::STRING_N, 0, 30), "password" => array(tlInputParameter::STRING_N, 0, 32), "authentication" => array(tlInputParameter::STRING_N, 0, 10), "user_is_active" => array(tlInputParameter::CB_BOOL));
    $args = new stdClass();
    R_PARAMS($iParams, $args);
コード例 #5
0
ファイル: usersEdit.php プロジェクト: tamtrong/testlink
        $op = createNewPassword($db, $args, $user);
        break;
    case "create":
    default:
        $highlight->create_user = 1;
        $user = new tlUser();
        break;
}
$op->operation = $actionOperation[$args->doAction];
$roles = tlRole::getAll($db, null, null, null, tlRole::TLOBJ_O_GET_DETAIL_MINIMUM);
unset($roles[TL_ROLES_UNDEFINED]);
$smarty = new TLSmarty();
$smarty->assign('highlight', $highlight);
$smarty->assign('operation', $op->operation);
$smarty->assign('user_feedback', $op->user_feedback);
$smarty->assign('external_password_mgmt', tlUser::isPasswordMgtExternal());
$smarty->assign('mgt_view_events', $_SESSION['currentUser']->hasRight($db, "mgt_view_events"));
$smarty->assign('grants', getGrantsForUserMgmt($db, $_SESSION['currentUser']));
$smarty->assign('optRights', $roles);
$smarty->assign('userData', $user);
renderGui($smarty, $args, $templateCfg);
/**
 * 
 *
 */
function init_args()
{
    $iParams = array("delete" => array(tlInputParameter::INT_N), "user" => array(tlInputParameter::INT_N), "user_id" => array(tlInputParameter::INT_N), "rights_id" => array(tlInputParameter::INT_N), "doAction" => array(tlInputParameter::STRING_N, 0, 30), "firstName" => array(tlInputParameter::STRING_N, 0, 30), "lastName" => array(tlInputParameter::STRING_N, 0, 100), "emailAddress" => array(tlInputParameter::STRING_N, 0, 100), "locale" => array(tlInputParameter::STRING_N, 0, 10), "login" => array(tlInputParameter::STRING_N, 0, 30), "password" => array(tlInputParameter::STRING_N, 0, 32), "user_is_active" => array(tlInputParameter::CB_BOOL));
    $args = new stdClass();
    R_PARAMS($iParams, $args);
    return $args;