Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
VMS-SUEE_2.0
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Eric Laufer
VMS-SUEE_2.0
Commits
224c10bc
Commit
224c10bc
authored
Oct 26, 2020
by
Eric Laufer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug
#42
Bug
#42
Anforderung von neuem Passwort ohne function
parent
e380394a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
18 deletions
+22
-18
lib/class/daten.class.php
lib/class/daten.class.php
+20
-14
lib/funktionen/konto/daten.php
lib/funktionen/konto/daten.php
+1
-3
page/intern/daten.php
page/intern/daten.php
+1
-1
No files found.
lib/class/daten.class.php
View file @
224c10bc
<?php
class
daten_anfordern
{
class
daten
{
private
$mail
;
private
$db
;
private
$gconfig
;
private
$error
;
private
$meldung
;
private
$mail
;
public
function
__construct
(){
global
$datenbank
,
$grundconfig
;
$this
->
db
=
$datenbank
;
$this
->
gconfig
=
$grundconfig
;
$this
->
mail
=
Classloader
(
'mail'
);
}
public
function
user_suche
(
$mailad
){
global
$datenbank
,
$error
,
$meldung
;
$user
=
$datenbank
->
exists
(
PREFIX
.
EMAIL
,
'uid'
,
array
(
"emailadresse"
=>
$datenbank
->
escape
(
$mailad
)
));
$user
=
$this
->
db
->
exists
(
PREFIX
.
EMAIL
,
'uid'
,
array
(
"emailadresse"
=>
$datenbank
->
escape
(
$mailad
)
));
if
(
$user
==
true
){
$u
=
$
datenbank
->
get_row
(
"SELECT uid FROM "
.
PREFIX
.
EMAIL
.
" WHERE emailadresse = '"
.
$datenbank
->
escape
(
$mailad
)
.
"' "
,
true
);
$u
=
$
this
->
db
->
get_row
(
"SELECT uid FROM "
.
PREFIX
.
EMAIL
.
" WHERE emailadresse = '"
.
$datenbank
->
escape
(
$mailad
)
.
"' "
,
true
);
$uid
=
$u
->
uid
;
$this
->
pw_neu
(
$uid
,
$mailad
);
}
else
{
...
...
@@ -17,11 +29,9 @@ class daten_anfordern{
public
function
pw_neu
(
$user
,
$mailad
){
global
$datenbank
,
$update
;
$pw_roh
=
create_code
(
10
);
$pw_neu
=
pw_erstellen
(
$pw_roh
);
$update
=
$datenbank
->
update
(
PREFIX
.
KONTO
,
array
(
"passwort"
=>
$pw_neu
),
array
(
"uid"
=>
$user
),
1
);
if
(
$update
==
true
){
if
(
$this
->
db
->
update
(
PREFIX
.
KONTO
,
array
(
"passwort"
=>
$pw_neu
),
array
(
"uid"
=>
$user
),
1
)
==
true
){
$this
->
pw_update
(
$mailad
,
$user
,
$pw_roh
);
}
else
{
$error
=
1
;
...
...
@@ -30,24 +40,20 @@ class daten_anfordern{
}
private
function
pw_update
(
$mailad
,
$user
,
$pw
){
global
$grundconfig
,
$datenbank
,
$error
,
$meldung
;
require_once
(
'lib/extra/mail.php'
);
$betreff
=
'Anforderung Passwort'
;
$nachricht
=
'Hallo,
Du hast soeben die Zugangsdaten für '
.
$
grund
config
->
seitenname
.
' angefordert.
Du hast soeben die Zugangsdaten für '
.
$
this
->
g
config
->
seitenname
.
' angefordert.
----------------------------------------------------------
Kontonummer: '
.
$user
.
'
Passwort: '
.
$pw
.
'
----------------------------------------------------------
Jetzt kannst Du dich wieder auf '
.
$
grund
config
->
domain
.
'
Jetzt kannst Du dich wieder auf '
.
$
this
->
g
config
->
domain
.
'
einloggen und das Passwort wieder ändern!
Mit freundlichen Grüßen
Das '
.
$grundconfig
->
seitenname
.
' Team
'
;
$mail
=
new
send_smtp_mail
;
$ausgabe
=
$mail
->
senden
(
$mailad
,
$betreff
,
$nachricht
);
if
(
$ausgabe
==
true
){
if
(
$this
->
mail
->
senden
(
$mailad
,
$betreff
,
$nachricht
)
==
true
){
$meldung
=
PASSWORT_SET_USER_TRUE
;
$error
=
0
;
}
else
{
...
...
lib/funktionen/konto/daten.php
View file @
224c10bc
<?php
require_once
(
'lib/class/daten.class.php'
);
$daten
=
new
daten_anfordern
;
$daten
=
Classloader
(
'daten'
);
$erg
=
$daten
->
user_suche
(
$_POST
[
'anf_email'
]);
page/intern/daten.php
View file @
224c10bc
...
...
@@ -6,7 +6,7 @@ head("Zugangsdaten anfordern");
Emailadresse sofort die Daten zu.<br>
<form action="" method="post">
<div align="center">
<b>Angemeldetet Email-Adresse: </b><input type="Text" name="
run[anf_email]"> <input type="Submit" name="anf_daten
" value="Anfordern!" style="width:120px;">
<b>Angemeldetet Email-Adresse: </b><input type="Text" name="
anf_email"> <input type="Submit" name="run[anf_daten]
" value="Anfordern!" style="width:120px;">
</div>
</form>'
;
foot
();
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment