staark / user
PHP User Manage System v2
v1.0.3
2022-06-03 06:43 UTC
Requires
- php: ^7.3|^8.0
- composer-runtime-api: ^2.0
README
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
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.