staark/user

PHP User Manage System v2

v1.0.3 2022-06-03 06:43 UTC

This package is auto-updated.

Last update: 2025-04-29 01:12:19 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License Lines of code GitHub code size in bytes Bitbucket open pull requests Bitbucket open issues

Languages Utilites

  • PHP (v 7.4)
  • Bootstrap Framework (v5.2 latest)
  • PDO (For Connection)
  • Password Hash (PHP Hash)
  • PHPMailer (PHP Library)

System Options Avaible

  • Login
  • Register
  • Forgot Password
  • Models
  • ActiveRecords
  • Validation on register
  • User password change with email

Demo

Demo Album

Settings

import Model with ' use Staark\Support\Model\User; '

import configuration with ' require_once 'config.php'; '

Exemple

  • Protected attr on model (not update in database with save() function):
    • id
    • password
    • password_reset
    • created_at
- `$user->func or $user->attr`
- `User::func`

// Check session user's
User::isGuest();

// Update user attributes in database
$user->last_name = 'Your Last Name';
$user->save();

// Using that you create a new user in database.
User::create([
  'first_name' => 'John',
  'last_name' => 'Doe',
  'email' => 'youremail@exemple.com',
  'password' => User::passHash('pass'),
]);

// Get errors of action page
$user->getErrors(); return bool|array

// Send Email
$user->sendEmail('email', [array options]); return bool

Configuration

Open file config.php and edit database and email server.