PHP code example of znframework / package-authentication
1. Go to this page and download the library: Download znframework/package-authentication library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
znframework / package-authentication example snippets
N::run();
use ZN\Request\Post;
# Register
User::register
(
[
'username' => Post::username(),
'password' => Post::password(),
'usermail' => Post::email(),
'address' => Post::address(),
'phone' => Post::mobilePhone()
],
'users/login'
);
Output::display(User::error());
use ZN\Request\Post;
$status = User::login(Post::username(), Post::password(), Post::rememberMe());
if( $status === false )
{
redirect(URL::prev());
}