mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
76_SMAPortal: contrib 3.1.2
git-svn-id: https://svn.fhem.de/fhem/trunk@22274 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
b73e78bcca
commit
7740a2cb98
@ -1048,7 +1048,7 @@ sub _doLogin {
|
||||
my ($logname) = $sc =~ /SunnyPortalLoginInfo=Username=(.*?)&/sx;
|
||||
Log3 ($name, 5, "$name - Header Set-Cookie: ".$sc) if($v5d =~ /loginData/);
|
||||
|
||||
if(__isLoggedIn ($username,$loginp,$name)) { # Login erfolgeich(Landing Pages können im Portal eingestellt werden!)
|
||||
if(__isLoggedIn ($name,$username,$loginp)) { # Login erfolgeich(Landing Pages können im Portal eingestellt werden!)
|
||||
handleCounter ($name, "dailyIssueCookieCounter"); # Cookie Ausstellungszähler setzen
|
||||
BlockingInformParent("FHEM::SMAPortal::setFromBlocking", [$name, "loginState:successful", "oldlogintime:".(gettimeofday())[0] ], 1);
|
||||
$errstate = 0;
|
||||
@ -1094,7 +1094,7 @@ return ($state, $errstate);
|
||||
sub __isLoggedIn {
|
||||
my $name = shift;
|
||||
my $username = shift;
|
||||
my $loginp = shift // return;
|
||||
my $loginp = shift;
|
||||
|
||||
my $sc = $loginp->header('Set-Cookie') // "";
|
||||
my ($logname) = $sc =~ /SunnyPortalLoginInfo=Username=(.*?)&/sx;
|
||||
@ -1104,7 +1104,7 @@ sub __isLoggedIn {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
################################################################
|
||||
|
Loading…
Reference in New Issue
Block a user