CodeIgniter-Aauth icon indicating copy to clipboard operation
CodeIgniter-Aauth copied to clipboard

Ideas About New Functions

Open REJack opened this issue 6 years ago • 2 comments

Hey dear Aauth Community,

I am working on some projects at the moment and I am trying to figure out how to accomplish new functions like account expiry or group variables like max upload size or max posts per day, this would be differnt per group.

My Plans:

ACCOUNT_EXPIRY:

  • option for determine first time
    • created_date OR first_login_date
  • option for X days = 1 month for expand expiry

GROUP_VARIABLES:

  • database table & functions like user_variables

My Mental Hurdles :grin::

ACCOUNT_EXPIRY:

  • how to determine default expiry_time for groups?
  • how/where to store first date?
    • users_expiry table
    • column in user table
    • system user_var
  • how to expand expiry_time * X months
    • where should I save the next expiry_date?

What you think about this?

P.S.: I'm still working on Aauth v3.0.0, I am stuck a bit on the user creation/update tests (i want 100% test coverage with all options xD) but I am commit soon the library with all user related functions without get_user_groups, is_allowed & etc.

REJack avatar Nov 16 '17 12:11 REJack

Do not have group by default. I made the following modification in the code: /config/aauth.php

$config_aauth["default"] = array(
	'no_permission'                  => 'error',

	'admin_group'                    => 'admin',
	'default_group'                  => '',
	'public_group'                   => 'public',

Class method create_user:

// set default group
if(!empty($this->config_vars['default_group'])){
     $this->add_member($user_id, $this->config_vars['default_group']);
}

Sorry my english. Regards Lucas

oniricosistemas avatar Nov 18 '17 19:11 oniricosistemas

Hi, its very cool idea, I am also planning to add subcsriptions feature to Aauth.

emreakay avatar Dec 22 '18 21:12 emreakay