Actions

Difference between revisions of "JClientHelper/setCredentials"

From Joomla! Documentation

(New page: This method checks if the given 'user' and 'password' credentials for the given client are valid. If they are, the given credentials are set to be the new login credentials for that client...)
 
m (<code> not closed)
 
Line 1: Line 1:
 
This method checks if the given 'user' and 'password' credentials for the given client are valid. If they are, the given credentials are set to be the new login credentials for that client. Returns '''TRUE''' if given login credentials have been set and are valid.
 
This method checks if the given 'user' and 'password' credentials for the given client are valid. If they are, the given credentials are set to be the new login credentials for that client. Returns '''TRUE''' if given login credentials have been set and are valid.
 
===Syntax===
 
===Syntax===
<code>boolean  setCredentials  ($client, $user, $pass) <code>
+
<code>boolean  setCredentials  ($client, $user, $pass) </code>
  
 
{| class="wikitable"
 
{| class="wikitable"

Latest revision as of 13:39, 20 June 2013

This method checks if the given 'user' and 'password' credentials for the given client are valid. If they are, the given credentials are set to be the new login credentials for that client. Returns TRUE if given login credentials have been set and are valid.

Contents

Syntax

boolean setCredentials ($client, $user, $pass)

Argument Data type Description Default
$client string Client name, currently only 'ftp' is supported
$user string Username
$pass string Password

Returns

Returns TRUE if given login credentials have been set and are valid.

Example

jimport('joomla.client.helper');
 
JClientHelper::setCredentials('ftp','username', 'password');

See also