No description
php
This repository has been archived on 2023-07-28. You can view files and clone it, but cannot push or open issues or pull requests.
Find a file
2016-07-10 17:32:38 +02:00
bin initial release 2016-07-10 17:32:38 +02:00
cache initial release 2016-07-10 17:32:38 +02:00
config initial release 2016-07-10 17:32:38 +02:00
data initial release 2016-07-10 17:32:38 +02:00
log initial release 2016-07-10 17:32:38 +02:00
public initial release 2016-07-10 17:32:38 +02:00
src initial release 2016-07-10 17:32:38 +02:00
.gitignore initial release 2016-07-10 17:32:38 +02:00
composer.json initial release 2016-07-10 17:32:38 +02:00
README.md initial release 2016-07-10 17:32:38 +02:00

README

A simple WebUI for admin_rest module of prosody allowing 2 step verification of new user accounts (as an alternative to the integrated register_web module).

This app uses

  • Slim Version 3
  • Eloquent ORM
  • PHPMigration
  • GUMP Validation
  • Twig
  • Curl
  • PHPMailer
  • Symfony Translation
  • Sqlite

as dependencies.

Requirements

  • admin_rest module of prosody
  • composer
  • sqlite pdo, mb_string

Install

  • Install composer
  • Change directory to project home
  • Copy config/env.example to config/env and adjust to your needs
  • composer install
  • php bin/phpmig migrate
  • start server with php -S localhost:8080 -t public public/index.php
  • point browser to localhost:8080 to have a preview

Deployment

  • Set up a cron job using php projectRootDir/bin/UsersAwaitingVerificationCleanUpCronJob.php to clean up users who signed up but did not verify their account periodically.

  • Point your document root to public/.

  • Example nginx conf:

    root   .../public;
    index index.php;    
    
    rewrite_log on;
    
    location / {
        try_files $uri $uri/ @ee;
    }
    
    location @ee {
        rewrite ^(.*) /index.php?$1 last;
    }
    
    # php fpm
    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass   unix:/var/run/php-fpm/php-fpm.sock;
        include        fastcgi_params;
    }    
    

Upgrade

  • Change directory to project home
  • git pull
  • composer update
  • php bin/phpmig migrate

Translations

This app uses Symfony Translator. It's bootstraped in Util\TranslationHelper and locales are placed under data/locale/. Adjust to your needs or help translating.