RTMP/E
removeAdmin(user:String [,scope:String]) : Object
HTTP
http://www.example.com:1111/admin/removeAdmin?auser=username&apswd=password&user=name[&scope=scope]
Removes an administrator from the system. Depending on the parameters you specify, you can remove server administrators or virtual host administrators.
You must be a server administrator to remove an administrator from the system.
Availability
Flash Communication Server 1.0.
Parameters
user
A String indicating the user name of the administrator being removed.
scope
A String indicating which administrator you want to remove.
To remove a virtual host administrator from the virtual host to which you’re connected, omit this parameter. To remove a virtual host administrator from a different virtual host, specify the virtual host as adaptor_name/virtual_hostname.
To remove a server administrator, specify server.
auser
A String indicating the user name of the administrator.
apswd
A String indicating the password of the administrator.
Returns
RTMP/E
If the call succeeds, the server sends a reply information object with a level property of status and a code property of NetConnection.Call.Success.
If the call fails, the server sends a reply information object with a level property of error and a code property of NetConnection.Admin.Command.Failed or a more specific value, if available. Some objects might also have a description property that contains a string describing the cause of the failure.
If the specified administrator does not exist, the call fails.
HTTP
If the call succeeds, it returns XML with the following structure:
<result> <level></level> <code></code> <timestamp></timestamp> </result>If the call fails, it returns XML with the following structure:
<result> <level></level> <code></code> <description></description> <timestamp></timestamp> </result>The XML elements contain the same information as the Object properties returned in an RTMP/E call.
Note: The timestamp response over HTTP is formatted differently on Windows (9/23/2007 6:16:40 PM) and Linux (Sun 23 Sep 2007 06:16:40 PM IST).
Example
The following examples show the removeAdmin() method:
nc_admin = new NetConnection(); nc_admin.connect("rtmp://localhost:1111/admin", "JLee", "x52z49ab"); /* Remove a server administrator named "DYoung" */ nc-admin.call("removeAdmin", new onRemoveAdmin(), "DYoung", "server"); /* Remove a virtual host administrator named "LPark" */ nc_admin.call("removeAdmin", new onRemoveAdmin(), "LPark"); /* Remove a virtual host administrator "JGarcia" from vhost tree.oak.com */ nc_admin.call("removeAdmin", new onRemoveAdmin(), "JGarcia", "_defaultRoot_/ ¬ tree.oak.com");
See also