user_info(), admin_info() form()
Read-only rows naming the user (or admin) of $replace[user_id], linked to the account page.
form()->user_info($name = '', $desc = '', $extra = [], $replace = [])
form()->admin_info($name = '', $desc = '', $extra = [], $replace = [])Options
| Option | Meaning |
|---|---|
db | Database object; default db(). |
(info options) | Every option of info(). |
Example
This example reads the database: it runs in the admin docs only.
Code
return form(['user_id' => 1])
->user_info('', 'Customer')
->admin_info('', 'Manager');Notes
- Both read
$replace['user_id'], whatever name you pass; designed for the admin (they read theuser/admintables). - The value is
login; email(or phone, or nick) for a user,loginfor an admin. Known bug, fixed behind a flag: the id the code means to put first is never shown;form2::$CONF_INFO_SHOWS_ID = true($PROJECT_CONF['form2']['CONF_INFO_SHOWS_ID'], Settings / Widget fixes; the 4.0 default) shows7; login; ....
See also: form/info, table/user