Plugin Directory

Changeset 708945


Ignore:
Timestamp:
05/06/2013 11:36:47 PM (13 years ago)
Author:
Yuttadhammo
Message:

fixing access add

File:
1 edited

Legend:

Unmodified
Added
Removed
  • buddypress-xml-rpc-receiver/trunk/admin/bp-xmlrpc-admin.php

    r708943 r708945  
    117117        $tab = 'main';
    118118
    119     // if adding access
    120    
    121     if ( isset ( $_GET['add_access'] ) && is_super_admin()) {
    122         $users = explode("\n",get_option('allowed_users'));
    123         if(!in_array($_GET['add_access'],$users)) {
    124             $users[] = $_GET['add_access'];
    125             update_option( 'allowed_users', implode( "\n", $users ));
    126             $added = true;
    127         }
    128     }
    129 
    130 
    131119    /* If the form has been submitted and the admin referrer checks out, save the settings */
    132120    if ( isset( $_POST['submit'] ) && check_admin_referer( 'bp_xmlrpc_admin' ) ) {
     
    175163        $updated = true;
    176164    }
     165    else if ( isset ( $_GET['add_access'] ) && is_super_admin()) {
     166       
     167        // if adding access
     168       
     169        $users = explode("\n",get_option('allowed_users'));
     170        if(!in_array($_GET['add_access'],$users)) {
     171            $users[] = $_GET['add_access'];
     172            update_option( 'allowed_users', implode( "\n", $users ));
     173            $added = true;
     174        }
     175    }
     176   
    177177?>
    178178    <div class="wrap">
Note: See TracChangeset for help on using the changeset viewer.