pub / rememori

Simple file-based bookmarking and notes application
git clone https://src.jayvii.de/pub/rememori.git
Home | Log | Files | Exports | Refs | README | RSS

create_initial_user.php (400B)


      1 <?php
      2 
      3 include("./lib/users.php");
      4 include("./config/config.php");
      5 $GLOBALS["data_dir"] = "./" . $GLOBALS["data_dir"];
      6 
      7 $user = readline('Enter new username: '); 
      8 $pass = readline('Enter new password: '); 
      9 
     10 $success = create_auth($user, $pass);
     11 
     12 if ($success) {
     13     echo "Account " . $user . " created successfully!" . PHP_EOL;
     14 } else {
     15     exit("Account creation failed for some reason...");
     16 }
     17 
     18 ?>
     19