daily pastebin goal
20%
SHARE
TWEET

Untitled

a guest Dec 13th, 2018 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /**
  3.  * Created by PhpStorm.
  4.  * User: student
  5.  * Date: 13.12.18
  6.  * Time: 01:30
  7.  */
  8.  
  9. namespace Controller;
  10.  
  11.  
  12. class AuthController extends Controller
  13. {
  14.     public function register()
  15.     {
  16.  
  17.         $user = $this->storage()->load("model_user_*");
  18.         return ["auth.register.index",["user" => $user]];
  19.     }
  20.     public function login()
  21.     {
  22.  
  23.         return "auth.login.index";
  24.     }
  25.     public function store()
  26.     {
  27.         $user = new User($_POST["id"]);
  28.         $user->name = $_POST["name"];
  29.         $user->surname = $_POST["surname"];
  30.         $user->email = $_POST["email"];
  31.         $user->password = $_POST["password"];
  32.         $user->password_confirmation = $_POST["password_confirmation"];
  33.  
  34.         $this->storage()->store($user);
  35.  
  36.         header("Location: /auth");
  37.     }
  38. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top