<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://docs.joomla.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://docs.joomla.org/index.php?title=JClientHelper/setCredentialsFromRequest&amp;feed=atom&amp;action=history</id>
		<title>JClientHelper/setCredentialsFromRequest - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://docs.joomla.org/index.php?title=JClientHelper/setCredentialsFromRequest&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://docs.joomla.org/index.php?title=JClientHelper/setCredentialsFromRequest&amp;action=history"/>
		<updated>2013-05-24T08:51:34Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.19.3</generator>

	<entry>
		<id>http://docs.joomla.org/index.php?title=JClientHelper/setCredentialsFromRequest&amp;diff=15246&amp;oldid=prev</id>
		<title>Batch1211 at 19:11, 10 August 2009</title>
		<link rel="alternate" type="text/html" href="http://docs.joomla.org/index.php?title=JClientHelper/setCredentialsFromRequest&amp;diff=15246&amp;oldid=prev"/>
				<updated>2009-08-10T19:11:53Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 19:11, 10 August 2009&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;This method checks if valid credentials have been passed through the request. If so, they are set as the new credentials for the client. Since this method is used to determine, if the input fields for the client settings need to be shown, this method returns '''FALSE''' if the credentials passed by the request could be successfully stored '''OR''' the credentials have been stored via the Global Configurations. Otherwise this method reurns '''TRUE'''.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;This method checks if valid credentials have been passed through the request. If so, they are set as the new credentials for the client. Since this method is used to determine, if the input fields for the client settings need to be shown, this method returns '''FALSE''' if the credentials passed by the request could be successfully stored '''OR''' the credentials have been stored via the Global Configurations. Otherwise this method reurns '''TRUE'''.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;===Syntax===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;===Syntax===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;code&amp;gt;boolean&amp;#160;  setCredentials&amp;#160; ($client, $user, $pass) &amp;lt;code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;code&amp;gt;boolean&amp;#160;  setCredentials&amp;#160; ($client, $user, $pass) &amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;/&lt;/ins&gt;code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;{| class=&amp;quot;wikitable&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;{| class=&amp;quot;wikitable&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Batch1211</name></author>	</entry>

	<entry>
		<id>http://docs.joomla.org/index.php?title=JClientHelper/setCredentialsFromRequest&amp;diff=12196&amp;oldid=prev</id>
		<title>Batch1211: New page: This method checks if valid credentials have been passed through the request. If so, they are set as the new credentials for the client. Since this method is used to determine, if the inpu...</title>
		<link rel="alternate" type="text/html" href="http://docs.joomla.org/index.php?title=JClientHelper/setCredentialsFromRequest&amp;diff=12196&amp;oldid=prev"/>
				<updated>2008-12-14T13:39:44Z</updated>
		
		<summary type="html">&lt;p&gt;New page: This method checks if valid credentials have been passed through the request. If so, they are set as the new credentials for the client. Since this method is used to determine, if the inpu...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This method checks if valid credentials have been passed through the request. If so, they are set as the new credentials for the client. Since this method is used to determine, if the input fields for the client settings need to be shown, this method returns '''FALSE''' if the credentials passed by the request could be successfully stored '''OR''' the credentials have been stored via the Global Configurations. Otherwise this method reurns '''TRUE'''.&lt;br /&gt;
===Syntax===&lt;br /&gt;
&amp;lt;code&amp;gt;boolean   setCredentials  ($client, $user, $pass) &amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Argument&lt;br /&gt;
!Data type&lt;br /&gt;
!Description&lt;br /&gt;
!Default&lt;br /&gt;
|-&lt;br /&gt;
|$client&lt;br /&gt;
|string&lt;br /&gt;
|Client name, currently only 'ftp' is supported&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Request Parameters ===&lt;br /&gt;
The method checks for the following two request parameters, that shall be used to set the credentials for the given client.&lt;br /&gt;
* '''username'''&lt;br /&gt;
* '''password'''&lt;br /&gt;
&lt;br /&gt;
=== Returns ===&lt;br /&gt;
Returns '''FALSE''' if:&lt;br /&gt;
* Parameters 'username' and 'password' that are passed via the request are not empty '''AND''' are valid (See [[JClientHelper/setCredentials]]). '''OR''':&lt;br /&gt;
* The credentials for the given client are set in the Global Configurations. &lt;br /&gt;
===Example===&lt;br /&gt;
In this example, we want to find out, if we need to show the login form for the FTP client:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
jimport('joomla.client.helper');&lt;br /&gt;
&lt;br /&gt;
if(JClientHelper::setCredentialsFromRequest('ftp'){&lt;br /&gt;
   // show login form&lt;br /&gt;
}&lt;br /&gt;
// continue with code&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This code checks if the credentials for the FTP client are passed via the request, or are already stored via the Global Configurations. If this is the case, the code continues without the login form beeing displayed. Otherwise, the login form is displayed.&lt;br /&gt;
===See also===&lt;br /&gt;
* [[JClientHelper/setCredentials]]&lt;br /&gt;
* [http://api.joomla.org/Joomla-Framework/Client/JClientHelper.html#setCredentialsFromRequest JClientHelper::setCredentialsFromRequest on api.joomla.org]&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Development]][[Category:Framework]][[Category:JClientHelper]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Batch1211</name></author>	</entry>

	</feed>