Browse Source

some changes

develop
Emre Akay 11 years ago
parent
commit
b34a57a379
  1. 50
      application/libraries/Aauth.php

50
application/libraries/Aauth.php

@ -970,12 +970,12 @@ class Aauth {
/** /**
* Is admin * Is admin
* Check if current user is a member of the admin group * 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 * @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);
} }
/** /**
@ -1445,6 +1445,16 @@ class Aauth {
$this->CI->session->set_flashdata('errors', $this->errors); $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 * Get Errors Array
* Return array of errors * Return array of errors
@ -1465,7 +1475,7 @@ class Aauth {
* @param string $divider Separator for errors * @param string $divider Separator for errors
* @return string String of errors separated by delimiter * @return string String of errors separated by delimiter
*/ */
public function get_errors($divider = '<br />'){ public function print_errors($divider = '<br />'){
$msg = ''; $msg = '';
$msg_num = count($this->errors); $msg_num = count($this->errors);
@ -1492,6 +1502,16 @@ class Aauth {
$this->CI->session->set_flashdata('infos', $this->errors); $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 * Get Info Array
* Return array of info * Return array of info
@ -1512,7 +1532,7 @@ class Aauth {
* @param string $divider Separator for info * @param string $divider Separator for info
* @return string String of info separated by delimiter * @return string String of info separated by delimiter
*/ */
public function get_infos($divider = '<br />'){ public function print_infos($divider = '<br />'){
$msg = ''; $msg = '';
$msg_num = count($this->infos); $msg_num = count($this->infos);
@ -1542,14 +1562,14 @@ class Aauth {
* stacoverflow * stacoverflow
* tamam // login e ip aderesi de eklemek lazım * 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 * 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) * tamam // eğer grup silinmişse kullanıcıları da o gruptan sil (fire)
* ismember la is admine 2. parametre olarak user id ekle * tamam // ismember la is admine 2. parametre olarak user id ekle
* kepp infos errors die bişey yap ajax requestlerinde silinir errorlar * tamam // kepp infos errors die bişey yap ajax requestlerinde silinir errorlar
* user variables * user variables
* sistem variables * sistem variables
* user perms * tamam // user perms
* parametre olarak array alma * parametre olarak array alma
* mysql index fulltext index?? * biraz tamam // 4mysql index fulltext index??
* *
* *
* ----------- * -----------
@ -1557,11 +1577,17 @@ class Aauth {
* *
* unban_user() added // unlock_user * unban_user() added // unlock_user
* remove member added // fire_member * remove member added // fire_member
* allow changed to allow_group * allow() changed to allow_group
* deny changed to deny_group * deny() changed to deny_group
* is member a yeni parametre eklendi * is member a yeni parametre eklendi
* allow_user() added * allow_user() added
* deny_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 * Done staff v1
* ----------- * -----------

Loading…
Cancel
Save