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

add_token_for_user.php (384B)


      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 the username: '); 
      8 $pass = readline('Enter new password: '); 
      9 
     10 $success = add_auth($user, $pass);
     11 
     12 if ($success) {
     13     echo "New token added for " . $user . PHP_EOL;
     14 } else {
     15     exit("Token could not be added for some reason...");
     16 }
     17 
     18 ?>
     19 
     20