ILIAS
Release_4_1_x_branch Revision 61804
◀ ilDoc Overview
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Groups
Pages
class.ilUserLoginInputGUI.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
11
class
ilUserLoginInputGUI
extends
ilFormPropertyGUI
12
{
13
protected
$value
;
14
protected
$size
= 40;
15
protected
$max_length
= 80;
16
protected
$checkunused
= 0;
17
24
function
__construct
($a_title =
""
, $a_postvar =
""
)
25
{
26
parent::__construct
($a_title, $a_postvar);
27
}
28
34
function
setValue
($a_value)
35
{
36
$this->value = $a_value;
37
}
38
44
function
getValue
()
45
{
46
return
$this->value
;
47
}
48
54
function
setValueByArray
($a_values)
55
{
56
$this->
setValue
($a_values[$this->
getPostVar
()]);
57
}
58
64
function
setCurrentUserId
($a_user_id)
65
{
66
$this->checkunused = $a_user_id;
67
}
68
74
function
getCurrentUserId
()
75
{
76
return
$this->checkunused
;
77
}
78
84
function
checkInput
()
85
{
86
global
$lng
;
87
88
$_POST
[$this->
getPostVar
()] =
ilUtil::stripSlashes
(
$_POST
[$this->
getPostVar
()]);
89
if
($this->
getRequired
() && trim(
$_POST
[$this->
getPostVar
()]) ==
""
)
90
{
91
$this->
setAlert
($lng->txt(
"msg_input_is_required"
));
92
93
return
false
;
94
}
95
if
(!
ilUtil::isLogin
(
$_POST
[$this->
getPostVar
()]))
96
{
97
$this->
setAlert
($lng->txt(
"login_invalid"
));
98
99
return
false
;
100
}
101
102
if
(
ilObjUser::_loginExists
(
$_POST
[$this->
getPostVar
()],$this->
getCurrentUserId
()))
103
{
104
$this->
setAlert
($lng->txt(
"login_exists"
));
105
106
return
false
;
107
}
108
109
110
return
true
;
111
}
112
116
function
insert
(&$a_tpl)
117
{
118
global
$lng
;
119
120
$a_tpl->setCurrentBlock(
"prop_login"
);
121
$a_tpl->setVariable(
"POST_VAR"
, $this->
getPostVar
());
122
$a_tpl->setVariable(
"ID"
, $this->
getFieldId
());
123
$a_tpl->setVariable(
"PROPERTY_VALUE"
,
ilUtil::prepareFormOutput
($this->
getValue
()));
124
$a_tpl->setVariable(
"SIZE"
, $this->size);
125
$a_tpl->setVariable(
"MAXLENGTH"
, $this->maxlength);
126
if
($this->
getDisabled
())
127
{
128
$a_tpl->setVariable(
"DISABLED"
,
129
" disabled=\"disabled\""
);
130
}
131
$a_tpl->parseCurrentBlock();
132
}
133
}
134
?>
Services
Form
classes
class.ilUserLoginInputGUI.php
Generated on Thu Apr 21 2016 19:02:50 for ILIAS by
1.8.1.2 (using
Doxyfile
)