Admin Users

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 for controlling the store.

Entity Object

$user = new ent_user(); // LiteCart 3.x use ent_administrator()
$user->data['username'] = '...';
$user->set_password('...');
$user->save();

Reference Model

Admin users doesn't have a reference object. Instead, values from the entity will be returned.

echo reference::user($username)->email;

Database Query

$user = database::query(
  "select * from ". DB_TABLE_PREFIX ."users
  where username = '". database::input($username) ."'
  limit 1;"
)->fetch();

المراجعات

المقالات التي تم تحريرها مؤخرا
This website uses no cookies and no third party tracking technology. We think we can do better than others and really think about your privacy.