Skip to content

Commit ebcd745

Browse files
committed
last few finishing touches
1 parent 45eaa69 commit ebcd745

8 files changed

Lines changed: 18 additions & 51 deletions

File tree

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
*.komodoproject
22
.DS_Store
33
_meta/*
4-
public/test/*
4+
public/test/*
5+
ROLES.md
6+
userfrosting/config-userfrosting.php

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@
1919
- Wrapper class Notification for sending emails, other notifications to users
2020
- Remove username requirement for password reset. It is more likely that an attacker would know the user's username, than the user themselves. For the next version, we can try to implement some real multi-factor authentication.
2121
- When a user creates another user, they don't need to set a password. Instead, an email is sent out to the new user, with a token allowing them to set their own password.
22+
- Admins can manually generate a password reset request for another user, or directly change the user's password.

ROLES.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

TODO.md

Lines changed: 0 additions & 27 deletions
This file was deleted.

userfrosting/config-userfrosting.php renamed to userfrosting/config-userfrosting-example.php

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,18 @@
11
<?php
2-
require_once 'vendor/autoload.php';
3-
require_once 'models/auth/password.php';
42

53
// Set your timezone here
64
date_default_timezone_set('America/New_York');
75

86
// Do not send fatal errors to the response body!
97
ini_set("display_errors", "off");
10-
11-
// Use native PHP sessions
12-
session_cache_limiter(false);
13-
session_name("UserFrosting");
14-
// First, initialize the PHP session
15-
session_start();
16-
8+
179
/* Instantiate the Slim application */
1810
$app = new \UserFrosting\UserFrosting([
1911
'view' => new \Slim\Views\Twig(),
2012
'mode' => 'dev' // Set to 'dev' or 'production'
2113
]);
2214

23-
// Get public path. Is this guaranteed to work in all environments?
15+
// Get file path to public directory for this website. Is this guaranteed to work in all environments?
2416
$public_path = $_SERVER['DOCUMENT_ROOT'] . $app->environment()['SCRIPT_NAME'];
2517

2618
// Construct public URL (e.g. "http://www.userfrosting.com/admin"). Feel free to hardcode this if you feel safer.

userfrosting/initialize.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,16 @@
55
* @author Alex Weissman
66
* @link http://www.userfrosting.com
77
*/
8-
9-
require_once("config-userfrosting.php");
8+
9+
require_once 'vendor/autoload.php';
10+
require_once 'models/auth/password.php';
11+
require_once 'config-userfrosting.php';
12+
13+
// Use native PHP sessions
14+
session_cache_limiter(false);
15+
session_name("UserFrosting");
16+
// First, initialize the PHP session
17+
session_start();
1018

1119
use \Slim\Extras\Middleware\CsrfGuard;
1220

userfrosting/models/database/Database.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ public static function install(){
261261
(2, 'uri_users', 'always()'),
262262
(1, 'uri_account_settings', 'always()'),
263263
(1, 'update_account_setting', 'equals(self.id, user.id)&&in(property,[\"email\",\"locale\",\"password\"])'),
264-
(2, 'update_account_setting', 'in(property,[\"email\",\"display_name\",\"title\",\"locale\",\"flag_enabled\"])'),
264+
(2, 'update_account_setting', '!in_group(user.id,2)&&in(property,[\"email\",\"display_name\",\"title\",\"locale\",\"flag_password_reset\",\"flag_enabled\"])'),
265265
(2, 'view_account_setting', 'in(property,[\"user_name\",\"email\",\"display_name\",\"title\",\"locale\",\"flag_enabled\",\"groups\",\"primary_group_id\"])'),
266266
(2, 'delete_account', '!in_group(user.id,2)'),
267267
(2, 'create_account', 'always()');");

userfrosting/models/database/UFModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ abstract class UFModel extends Model {
3535
* Create a new object, initializing the table name and whitelisted columns.
3636
*
3737
*/
38-
public function __construct($properties = [], $id = null) {
38+
public function __construct($properties = []) {
3939
$table_schema = Database::getSchemaTable(static::$_table_id);
4040
$this->table = $table_schema->name;
4141
$this->fillable = $table_schema->columns;

0 commit comments

Comments
 (0)