Skip to content

Commit

Permalink
some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Emre Akay committed Jun 28, 2014
1 parent 20aab13 commit b34a57a
Showing 1 changed file with 39 additions and 13 deletions.
52 changes: 39 additions & 13 deletions application/libraries/Aauth.php
Original file line number Diff line number Diff line change
Expand Up @@ -970,12 +970,12 @@ public function is_member( $group_par, $user_id = false ) {
/**
* Is admin
* Check if current user is a member of the admin group
* @param int|string $group_par Group id or name to check
* @param int $user_id User id to check, if it is not given checks current user
* @return bool
*/
public function is_admin() {
public function is_admin( $user_id = false ) {

return $this->is_member($this->config_vars['admin_group']);
return $this->is_member($this->config_vars['admin_group'],$user_id);
}

/**
Expand Down Expand Up @@ -1431,7 +1431,7 @@ public function set_as_read_pm($pm_id){
}

########################
# Error/Info Functions
# Error / Info Functions
########################

/**
Expand All @@ -1445,6 +1445,16 @@ public function error($message){
$this->CI->session->set_flashdata('errors', $this->errors);
}

/**
* Keep Errors
* keeps the flash data flash data
* more info about flash data
* http://ellislab.com/codeigniter/user-guide/libraries/sessions.html
*/
public function keep_errors(){
$this->session->keep_flashdata('errors');
}

/**
* Get Errors Array
* Return array of errors
Expand All @@ -1465,7 +1475,7 @@ public function get_errors_array(){
* @param string $divider Separator for errors
* @return string String of errors separated by delimiter
*/
public function get_errors($divider = '<br />'){
public function print_errors($divider = '<br />'){

$msg = '';
$msg_num = count($this->errors);
Expand All @@ -1492,6 +1502,16 @@ public function info($message){
$this->CI->session->set_flashdata('infos', $this->errors);
}

/**
* Keep Infos
* keeps the flash data
* more info about flash data
* http://ellislab.com/codeigniter/user-guide/libraries/sessions.html
*/
public function keep_infos(){
$this->session->keep_flashdata('infos');
}

/**
* Get Info Array
* Return array of info
Expand All @@ -1512,7 +1532,7 @@ public function get_infos_array(){
* @param string $divider Separator for info
* @return string String of info separated by delimiter
*/
public function get_infos($divider = '<br />'){
public function print_infos($divider = '<br />'){

$msg = '';
$msg_num = count($this->infos);
Expand Down Expand Up @@ -1542,26 +1562,32 @@ public function get_infos($divider = '<br />'){
* stacoverflow
* tamam // login e ip aderesi de eklemek lazım
* list_users da grup_par verilirse ve adamın birden fazla grubu varsa nolurkun? // bi denemek lazım belki distinct ile düzelir
* eğer grup silinmişse kullanıcıları da o gruptan sil (fire)
* ismember la is admine 2. parametre olarak user id ekle
* kepp infos errors die bişey yap ajax requestlerinde silinir errorlar
* tamam // eğer grup silinmişse kullanıcıları da o gruptan sil (fire)
* tamam // ismember la is admine 2. parametre olarak user id ekle
* tamam // kepp infos errors die bişey yap ajax requestlerinde silinir errorlar
* user variables
* sistem variables
* user perms
* tamam // user perms
* parametre olarak array alma
* mysql index fulltext index??
* biraz tamam // 4mysql index fulltext index??
*
*
* -----------
* ok
*
* unban_user() added // unlock_user
* remove member added // fire_member
* allow changed to allow_group
* deny changed to deny_group
* allow() changed to allow_group
* deny() changed to deny_group
* is member a yeni parametre eklendi
* allow_user() added
* deny_user() added
* keep_infos() added
* kepp_errors() added
* get_errors() changed to print_errors()
* get_infos() changed to print_infos()
*
*
*
* Done staff v1
* -----------
Expand Down

0 comments on commit b34a57a

Please sign in to comment.