Administrators

Titel

OldNew
1Users Users1Administrators

Permalink

OldNew
1admin/users_users1administrators

Inhoud

OldNew
1# Admin:users/users1# Admin Users
22
3 **Users** holds login credentials that allows a person to access3 Admin users, **users**, or administrators as they are called in Litecart 3.x, are a set of credentials that allows you to sign in to the [backend](backend) for controlling the store.
4 the [administration panel](administration_panel).4
55## Entity Object
6The admin panel has dual login protection for the high-risk of exposed6
7services on the internet:7```php
88$user = new ent_user(); // LiteCart 3.x use ent_administrator()
9 * .htaccess authorization (protection of files and folders)9$user->data['username'] = '...';
10 * session based protection (logical protection of application features)10$user->set_password('...');
11$user->save();
12```
13
14## Reference Model
15
16Admin users doesn't have a reference object. Instead, values from the entity will be returned.
17
18```php
19echo reference::user($username)->email;
20```
21
22## Database Query
23
24```php
25$query = database::query(
26 "select * from ". DB_TABLE_PREFIX ."users
27 where username = '". database::input($username) ."'
28 limit 1;"
29);
30
31$user = database::fetch($query);
32```

Geredigeer deur tim op 30 Jan. 2024 om 00:12

View code on GitHub