Giter Club home page Giter Club logo

apine-framework's People

Contributors

binarmorker avatar youmy001 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

cgrafton

apine-framework's Issues

ApineSession login method does not login with email

The latest changes to the authentication that allow old and new passwords does not take into account that we may log in with our email address. Line 233 currently reads

if ((ApineUserFactory::is_name_exist($user_name) || ApineUserFactory::is_email_exist($user_name)) && ApineUserFactory::create_by_name($user_name)->get_register_date() < "2015-09-04") {

and should probably read something in those lines:

if ((ApineUserFactory::is_name_exist($user_name) && ApineUserFactory::create_by_name($user_name)->get_register_date() < "2015-09-04") || (ApineUserFactory::is_email_exist($user_name) && ApineUserFactory::create_by_email_address($user_name)->get_register_date() < "2015-09-04")) {

Non-existant constant

In the class ApineUser, the method "get_register_date" refers to a non-existant constant, APP_DATE_FORMAT. Data format should be defined in the config.

Liste::key_exists() throws a notice on elements with arrays in them

The method array_diff_assoc on line 352 in lib/core/Liste.php throws a notice when at least one of the two compared objects contain an array. That is because array_diff_assoc then treats the object as a multidimentional array, which it does not support. It then gives the following:

Notice: Array to string conversion in lib/core/Liste.php at line 352

A possible fix would be to serialize the objects before passing them into an array_diff, then unserializing the result, like this:

$diff = array_map('unserialize', array_diff(array_map('serialize', $pageids), array_map('serialize', $parentpage)));

Wrong Default User

The default user is defined to be of type 70 in the database, but this type does not exist in the code. The codified type for a default user is 65, and the type for an admin is 77. Because of that, a newly created user is assigned a type that does not correspond to anything, therefore can't be used.

File crashes PHP on non-existing file

The constructor of lib/file/File.php uses the method fread without being enclosed in a try/catch, which means whenever it tries to read a file that doesn't exist, it crashes the whole script.

Setup wrong locales directory on installation

The installer add the reference to a directory "resources/language" for the locales which does not exists. It should instead add "resources/languages" as the default locales directory.

User authentication

The user authentication could use some customization outside of the "ApineUser" class. For example, a website administrator may want to authenticate users using the email insteal of the username, or even use both.

Multiple groups

The actual groups are very useful for permission management, but it would be better to integrate it as a list of groups, to use more complex permissions. The method "get_group" could be renamed as "get_groups" and return a "Liste" of groups, and "set_group" could become "add_group".

ApineUser::has_group() always false

When I call ApineUser::has_group() it always returns false even if users have a group assigned by default during registration. Currently the only way to fix that is to call ApineUser::get_group() beforehand.

Add custom port support

Many modules in the framework currently implies the request come from the default http and https ports. When testing with custom ports the application will fail to generate valid links and return 404 response.

Plausible addition point would be inside Request and URLHelper classes.

ApineFileImage is broken

ApineFileImage does not follow the same structure as ApineFile, and the functions used in ApineFileImage do not work anymore with its parent. Therefore, the class should use a rewrite in my opinion.

Bad query

In the class ApineUserFactory, the method "create_by_group" contains a bad SQL query. Normally, "SELECT ID from apine_users where group=$group" would work. In this case, the keyword "group" in reserved in MySQL and is therefore not considered a column name, but that specific keyword and thus the query fails. The query should be replaced by "SELECT ID from apine_userswheregroup=$group".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.