This topic is locked

Dropdown Field in menu bar to login to specific assed

1/29/2020 10:49:06
PHPRunner Tips and Tricks
C
ckranich authorDevClub member

Hi,
I am looking around to extend the SESSION vars of the login uses by an asset.
Purpose:

A factory where user logs into a certain production line, if his group membership allows.

Therefore I have a non-login dashboard as landing page and the login form switched to embedded (into menu)

left of username password and login button it would be nice to have a dropdown field for selecting LINE1,LINE2....
I have looked around but could not find anything I can use here...

I am using very last 10.3 build on X64
Any ideas how to implement this?
Kind greetings,

ckranich

C
ckranich authorDevClub member 1/29/2020

looks as if $_SESSION is no longer supported since 9.7

allthough there is an example in the manual
function AfterSuccessfulLogin($username, $password, $data)

{

$_SESSION["FirstName"] = $data["FirstName"];

}
but on other chapter it says:
Replaced

Starting with PHPRunner version 9.7, session variables were replaced with the functionality available via Security API and Search API.

The only exception is the language variable.

C
CTom 1/29/2020

$_SESSION variables are working just fine (10.3 version)
Catalin

C
ckranich authorDevClub member 1/29/2020



$_SESSION variables are working just fine (10.3 version)
Catalin


Thx for confirmation!

C
ckranich authorDevClub member 1/29/2020

In the meantime found out that
AddFields in Designer (for Login Form, if Login Form Mode is form) works for fields from the password table.
So I added a field "PLINE" with a lookup value from a table with the production lines.
Unfortunately ALL fields from the Login Form MUST MATCH their fields in the password table....

(I am currently peeking into security.php, but cannot spot where this behaviour is sourced..)

At least I found an announcement of this behaviour

https://twitter.com/phprunner/status/1181625902968561664

A
acpan 1/29/2020

fyi, you posted in the wrong forum.

C
ckranich authorDevClub member 1/30/2020



fyi, you posted in the wrong forum.


Yes, thx for notification. Could this be moved by Admin?