![]() |
mbintex 3/5/2020 |
Have a look here: |
![]() |
Sergey Kornilov admin 3/7/2020 |
Use the following as default value: Security::getUserName()
|
P
|
PaulM author 4/27/2020 |
Use the following as default value: Security::getUserName()
|
D
|
DealerModulesDevClub member 4/27/2020 |
I have a field in a table signed_by. I want this field to default to the current logged in user when the row is added and changed if a different user is logged in when the row is edited. I've tried :user.fullname and $_session[user_id] in the editor as a default value and the AutoUpdate value but it doesn't work. Any help would be gratefully received. Thanks
|
P
|
PaulM author 4/27/2020 |
In my apps I am using $_SESSION["UserName"] instead of $_session[user_id] that you mentioned above. In the "add" page I am on using as default value. In the "edit" page I am using this for the default and AutoUpdate value. Paul
|
![]() |
Sergey Kornilov admin 4/27/2020 |
@PaulM, |
P
|
PaulM author 4/28/2020 |
@PaulM, you doing yourself a huge disservice trying to craft SQL Queries manually and forgetting to add single quotes around $userName. You need to use Database API that takes care of things like this: https://xlinesoft.com/phprunner/docs/db_insert.htm
|