I have a notifications table in database and also have a users table.In notifications table I have user_id,notific_user_id,post_id.I can print_r $user variable which is in Controller but can to access the $user->first_name.
This is the Controller:
public function test()
{
$result=Notifications::where('user_id',Auth::user()->id)->get();
echo '<pre>';
foreach ($result as $result){
$user=User::where('id',$result->notific_user_id)->first()->get();
print_r($user);
}
}
And this is some of the output
Illuminate\Database\Eloquent\Collection Object
(
[items:protected] => Array
(
[0] => App\User Object
(
[connection:protected] =>
[table:protected] =>
[primaryKey:protected] => id
[perPage:protected] => 15
[incrementing] => 1
[timestamps] => 1
[attributes:protected] => Array
(
[id] => 100000000
[created_at] => 2016-04-28 19:25:01
[updated_at] => 2016-05-10 05:03:22
[user_name] => 1
[first_name] => Tuhin
[last_name] => Hossain
[nick_name] =>
[email] => tuhinhossain47#gmail.com
[password] => $2y$10$XtUWwJwVe2qf86CSUN6AkOkQlCWYq8/b3TrvBt2xuMlh4wTzRgxbG
[date_of_birth] => 2016-04-30
[gender] => 1
[remember_token] => a1U4V4rgJogw3hzXE9jJ8kHqtVrR5FkrMlvLEaRsC6qtmgX3LAbB3MkrZAgz
)
[original:protected] => Array
(
[id] => 100000000
[created_at] => 2016-04-28 19:25:01
[updated_at] => 2016-05-10 05:03:22
[user_name] => 1
[first_name] => Tuhin
[last_name] => Hossain
[nick_name] =>
[email] => tuhinhossain47#gmail.com
[password] => $2y$10$XtUWwJwVe2qf86CSUN6AkOkQlCWYq8/b3TrvBt2xuMlh4wTzRgxbG
[date_of_birth] => 2016-04-30
[gender] => 1
[remember_token] => a1U4V4rgJogw3hzXE9jJ8kHqtVrR5FkrMlvLEaRsC6qtmgX3LAbB3MkrZAgz
)
[relations:protected] => Array
(
)
Now how can I access the first_name, last_name etc?
I tried print_r($user->first_name); but it did not work. Please help me.
You get a collection (list of objects), since you use the ->get() method for your Eloquent query builder
simply remove the ->get() and you will get the first object matching the query
Your code should look like this:
$user=User::where('id',$result->notific_user_id)->first();
Related
Is there any option that I can further filter post list for a custom post type in admin based on user_id if the same has been passed as a query string like http://album.multibaselocal.com/wp-admin/edit.php?post_type=albums&user_id=31 ?
Here is what I want to accomplish:
I have a custom post type called album which is used by site users to upload Albums to the system. By default when I go to the list page all albums come up fine. In user list page, I have added a custom column which shows a count of Published albums by each user which links back to album list page with a query string user_id like above.
I want to filter the albums by the user_id I have passed. Is this possible?
I am trying this:
add_filter( 'parse_query', 'filter_albums_further_if_user_id_found');
function filter_albums_further_if_user_id_found($query) {
if( isset($_GET['user_id']) && !empty($_GET['user_id'])) {
$user_id = $_GET['user_id'];
$requery = array(
'post_type' => 'albums',
'post_author' => $user_id,
'status' => 'publish',
'posts_per_page' => -1,
);
// What to do here?
}
}
I have lost here completely. Not an experienced WP developer!
If I have not understood it all wrong, because the hook I am using is called parse_query, I have to somehow parse the query again and filter the existing result using user_id. But don't know where and how.
EDIT (Query output):
WP_Query Object
(
[query] => Array
(
[post_type] => albums
[posts_per_page] => 20
)
[query_vars] => Array
(
[post_type] => albums
[posts_per_page] => 20
[error] =>
[m] =>
[p] => 0
[post_parent] =>
[subpost] =>
[subpost_id] =>
[attachment] =>
[attachment_id] => 0
[name] =>
[static] =>
[pagename] =>
[page_id] => 0
[second] =>
[minute] =>
[hour] =>
[day] => 0
[monthnum] => 0
[year] => 0
[w] => 0
[category_name] =>
[tag] =>
[cat] =>
[tag_id] =>
[author] =>
[author_name] =>
[feed] =>
[tb] =>
[paged] => 0
[meta_key] => user_id
[meta_value] => 31
[preview] =>
[s] =>
[sentence] =>
[title] =>
[fields] =>
[menu_order] =>
[embed] =>
[category__in] => Array
(
)
[category__not_in] => Array
(
)
[category__and] => Array
(
)
[post__in] => Array
(
)
[post__not_in] => Array
(
)
[post_name__in] => Array
(
)
[tag__in] => Array
(
)
[tag__not_in] => Array
(
)
[tag__and] => Array
(
)
[tag_slug__in] => Array
(
)
[tag_slug__and] => Array
(
)
[post_parent__in] => Array
(
)
[post_parent__not_in] => Array
(
)
[author__in] => Array
(
)
[author__not_in] => Array
(
)
)
[tax_query] => WP_Tax_Query Object
(
[queries] => Array
(
)
[relation] => AND
[table_aliases:protected] => Array
(
)
[queried_terms] => Array
(
)
[primary_table] =>
[primary_id_column] =>
)
[meta_query] =>
[date_query] =>
[post_count] => 0
[current_post] => -1
[in_the_loop] =>
[comment_count] => 0
[current_comment] => -1
[found_posts] => 0
[max_num_pages] => 0
[max_num_comment_pages] => 0
[is_single] =>
[is_preview] =>
[is_page] =>
[is_archive] => 1
[is_date] =>
[is_year] =>
[is_month] =>
[is_day] =>
[is_time] =>
[is_author] =>
[is_category] =>
[is_tag] =>
[is_tax] =>
[is_search] =>
[is_feed] =>
[is_comment_feed] =>
[is_trackback] =>
[is_home] =>
[is_404] =>
[is_embed] =>
[is_paged] =>
[is_admin] => 1
[is_attachment] =>
[is_singular] =>
[is_robots] =>
[is_posts_page] =>
[is_post_type_archive] => 1
[query_vars_hash:WP_Query:private] => 1c0b485390fc9607d8008a14177bd63d
[query_vars_changed:WP_Query:private] =>
[thumbnails_cached] =>
[stopwords:WP_Query:private] =>
[compat_fields:WP_Query:private] => Array
(
[0] => query_vars_hash
[1] => query_vars_changed
)
[compat_methods:WP_Query:private] => Array
(
[0] => init_query_flags
[1] => parse_tax_query
)
)
EDIT (Function body presently using):
add_action( 'pre_get_posts', 'filter_albums_further_if_user_id_found');
function filter_albums_further_if_user_id_found($query) {
if(!is_admin())
return;
if( isset($_GET['user_id']) && !empty($_GET['user_id']) ) {
$user_id = $_GET['user_id'];
$query->set('meta_key', 'user_id');
$query->set('meta_value', $user_id);
}
echo '<pre>'; print_r($query); echo '</pre>'; die();
}
This reminded me of a similar problem I had a couple weeks ago. I was wanting to adjust the 'orderby' part of the query, but I believe you can accomplish your task with the same action. Try using the 'pre_get_posts' action instead of that filter. I haven't tested this, so let me know if it works!
CORRECT ANSWER (EDITED after user input):
function user_id_filter( $query ) {
if ( ! is_admin() && !$query->is_main_query() )
return;
if( isset($_GET['user_id']) && !empty($_GET['user_id'])) {
$user_id = $_GET['user_id'];
$query->set( 'author', $user_id );
}
//Debug if necessary
//echo '<pre>'; print_r($query); echo '</pre>'; die();
}
add_action( 'pre_get_posts', 'user_id_filter', 500000000 );
I used this as a reference. https://codex.wordpress.org/Plugin_API/Action_Reference/pre_get_posts
I have the following code which gives me a query generated , what I need it is to walk the array ( php foreach ) to query the data.
I tried to do with the classic foreach (php) but I foreach throws an error.
Thanks in advance...
Array (
[0] => stdClass Object
(
[_new] =>
[_attributes] => Array
(
[id] => 36
[nombre] => Diana
[estado] => 1
)
[_related] => Array
(
)
[_c] =>
[_pk] => 36
[_alias] => t
[_errors] => Array
(
)
[_validators] =>
[_scenario] => update
[_e] =>
[_m] =>
)
[1] => stdClass Object
(
[_new] =>
[_attributes] => Array
(
[id] => 1
[geoCode] => MAX
)
[_related] => Array
(
)
[_c] =>
[_pk] => 1
[_alias] => t
[_errors] => Array
(
)
[_validators] =>
[_scenario] => update
[_e] =>
[_m] =>
))
As I walk or convert to be read as ?
<?php foreach ($response as $value) {echo $value->nombre;} ?>
I integrated Mangopay plugin into my wordpress site for crowdfunding
After configuring it and when i try to purchase using mangopay interface i got these errors.
exception 'MangoPay\ResponseException' with message 'Bad request. One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.' in /homepages/17/d555245609/htdocs/Itsaboutmyafrica/wp-content/plugins/wordpressmangopay/includes/mangoPaySDK/tools/restTool.inc:272
Stack trace:
#0 /homepages/17/d555245609/htdocs/Itsaboutmyafrica/wp-content/plugins/wordpressmangopay/includes/mangoPaySDK/tools/restTool.inc(126): MangoPay\RestTool->CheckResponseCode(Object(stdClass))
#1 /homepages/17/d555245609/htdocs/Itsaboutmyafrica/wp-content/plugins/wordpressmangopay/includes/mangoPaySDK/tools/restTool.inc(93): MangoPay\RestTool->RunRequest()
#2 /homepages/17/d555245609/htdocs/Itsaboutmyafrica/wp-content/plugins/wordpressmangopay/includes/mangoPaySDK/tools/apiBase.inc(157): MangoPay\RestTool->Request('/users/natural', 'POST', Array)
#3 /homepages/17/d555245609/htdocs/Itsaboutmyafrica/wp-content/plugins/wordpressmangopay/includes/mangoPaySDK/tools/apiUsers.inc(24): MangoPay\ApiBase->CreateObject('users_createnat...', Object(MangoPay\UserNatural))
#4 /homepages/17/d555245609/htdocs/Itsaboutmyafrica/wp-content/plugins/wordpressmangopay/includes/gateway/class-wm-fonctions-gateway.php(65): MangoPay\ApiUsers->Create(Object(MangoPay\UserNatural))
#5 /homepages/17/d555245609/htdocs/Itsaboutmyafrica/wp-content/plugins/wordpressmangopay/includes/gateway/class-wm-fonctions-gateway.php(43): WM_Fonction_Gateway::wm_create_mangopay_user(Object(WP_User))
#6 /homepages/17/d555245609/htdocs/Itsaboutmyafrica/wp-content/plugins/wordpressmangopay/includes/gateway/class-wm-woocommerce-gateway.php(104): WM_Fonction_Gateway::wm_get_mangopay_user(Object(WP_User))
#7 /homepages/17/d555245609/htdocs/Itsaboutmyafrica/wp-content/plugins/woocommerce/includes/class-wc-checkout.php(646): WM_Woocommerce_Gateway->process_payment(1804)
#8 /homepages/17/d555245609/htdocs/Itsaboutmyafrica/wp-content/plugins/woocommerce/includes/class-wc-ajax.php(369): WC_Checkout->process_checkout()
#9 [internal function]: WC_AJAX::checkout('')
#10 /homepages/17/d555245609/htdocs/Itsaboutmyafrica/wp-includes/plugin.php(496): call_user_func_array(Array, Array)
#11 /homepages/17/d555245609/htdocs/Itsaboutmyafrica/wp-admin/admin-ajax.php(85): do_action('wp_ajax_woocomm...')
#12 {main}MangoPay\ResponseException Object
(
[_responseCodes:MangoPay\ResponseException:private] => Array
(
[200] => OK
[206] => PartialContent
[400] => Bad request
[401] => Unauthorized
[403] => Prohibition to use the method
[404] => Not found
[405] => Method not allowed
[413] => Request entity too large
[422] => Unprocessable entity
[500] => Internal server error
[501] => Not implemented
)
[_errorInfo:MangoPay\ResponseException:private] => MangoPay\Error Object
(
[Message] => One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.
[Errors] => stdClass Object
(
[AuthorId] => The AuthorId field is required.
)
)
[RequestUrl] => https://api.sandbox.mangopay.com/v2/rota90/payins/card/web/
[message:protected] => Bad request. One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.
[string:Exception:private] =>
[code:protected] => 400
[file:protected] => /homepages/17/d555245609/htdocs/Itsaboutmyafrica/wp-content/plugins/wordpressmangopay/includes/mangoPaySDK/tools/restTool.inc
[line:protected] => 272
[trace:Exception:private] => Array
(
[0] => Array
(
[file] => /homepages/17/d555245609/htdocs/Itsaboutmyafrica/wp-content/plugins/wordpressmangopay/includes/mangoPaySDK/tools/restTool.inc
[line] => 126
[function] => CheckResponseCode
[class] => MangoPay\RestTool
[type] => ->
[args] => Array
(
[0] => stdClass Object
(
[Message] => One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.
[Type] => param_error
[Id] => a3a12c22-1bc3-41ff-b92b-d923cd763e7f
[Date] => 1427279161
[errors] => stdClass Object
(
[AuthorId] => The AuthorId field is required.
)
)
)
)
[1] => Array
(
[file] => /homepages/17/d555245609/htdocs/Itsaboutmyafrica/wp-content/plugins/wordpressmangopay/includes/mangoPaySDK/tools/restTool.inc
[line] => 93
[function] => RunRequest
[class] => MangoPay\RestTool
[type] => ->
[args] => Array
(
)
)
[2] => Array
(
[file] => /homepages/17/d555245609/htdocs/Itsaboutmyafrica/wp-content/plugins/wordpressmangopay/includes/mangoPaySDK/tools/apiBase.inc
[line] => 157
[function] => Request
[class] => MangoPay\RestTool
[type] => ->
[args] => Array
(
[0] => /payins/card/web/
[1] => POST
[2] => Array
(
[CreditedWalletId] => 6183033
[CardType] => CB_VISA_MASTERCARD
[ReturnURL] => http://itsaboutmyafrica.com/checkout/order-received/1804?key=wc_order_551277ae9f920
[Culture] => TN
[SecureMode] => DEFAULT
[DebitedFunds] => Array
(
[Currency] => EUR
[Amount] => 46000
)
[Fees] => Array
(
[Currency] => EUR
[Amount] => 0
)
[Tag] => 1804
)
)
)
[3] => Array
(
[file] => /homepages/17/d555245609/htdocs/Itsaboutmyafrica/wp-content/plugins/wordpressmangopay/includes/mangoPaySDK/tools/apiPayIns.inc
[line] => 17
[function] => CreateObject
[class] => MangoPay\ApiBase
[type] => ->
[args] => Array
(
[0] => payins_card-web_create
[1] => MangoPay\PayIn Object
(
[CreditedWalletId] => 6183033
[PaymentType] => CARD
[PaymentDetails] => MangoPay\PayInPaymentDetailsCard Object
(
[CardType] => CB_VISA_MASTERCARD
[CardId] =>
)
[ExecutionType] => WEB
[ExecutionDetails] => MangoPay\PayInExecutionDetailsWeb Object
(
[RedirectURL] =>
[ReturnURL] => http://itsaboutmyafrica.com/checkout/order-received/1804?key=wc_order_551277ae9f920
[TemplateURL] =>
[Culture] => TN
[SecureMode] => DEFAULT
)
[AuthorId] =>
[CreditedUserId] =>
[DebitedFunds] => Array
(
[Currency] => EUR
[Amount] => 46000
)
[CreditedFunds] =>
[Fees] => Array
(
[Currency] => EUR
[Amount] => 0
)
[Status] =>
[ResultCode] =>
[ResultMessage] =>
[ExecutionDate] =>
[Type] =>
[Nature] =>
[Id] =>
[Tag] => 1804
[CreationDate] =>
)
[2] => \MangoPay\PayIn
)
)
[4] => Array
(
[file] => /homepages/17/d555245609/htdocs/Itsaboutmyafrica/wp-content/plugins/wordpressmangopay/includes/gateway/class-wm-fonctions-gateway.php
[line] => 129
[function] => Create
[class] => MangoPay\ApiPayIns
[type] => ->
[args] => Array
(
[0] => MangoPay\PayIn Object
(
[CreditedWalletId] => 6183033
[PaymentType] => CARD
[PaymentDetails] => MangoPay\PayInPaymentDetailsCard Object
(
[CardType] => CB_VISA_MASTERCARD
[CardId] =>
)
[ExecutionType] => WEB
[ExecutionDetails] => MangoPay\PayInExecutionDetailsWeb Object
(
[RedirectURL] =>
[ReturnURL] => http://itsaboutmyafrica.com/checkout/order-received/1804?key=wc_order_551277ae9f920
[TemplateURL] =>
[Culture] => TN
[SecureMode] => DEFAULT
)
[AuthorId] =>
[CreditedUserId] =>
[DebitedFunds] => Array
(
[Currency] => EUR
[Amount] => 46000
)
[CreditedFunds] =>
[Fees] => Array
(
[Currency] => EUR
[Amount] => 0
)
[Status] =>
[ResultCode] =>
[ResultMessage] =>
[ExecutionDate] =>
[Type] =>
[Nature] =>
[Id] =>
[Tag] => 1804
[CreationDate] =>
)
)
)
[5] => Array
(
[file] => /homepages/17/d555245609/htdocs/Itsaboutmyafrica/wp-content/plugins/wordpressmangopay/includes/gateway/class-wm-woocommerce-gateway.php
[line] => 152
[function] => wm_create_payin
[class] => WM_Fonction_Gateway
[type] => ::
[args] => Array
(
[0] =>
[1] => http://itsaboutmyafrica.com/checkout/order-received/1804?key=wc_order_551277ae9f920
[2] => 1804
)
)
[6] => Array
(
[file] => /homepages/17/d555245609/htdocs/Itsaboutmyafrica/wp-content/plugins/woocommerce/includes/class-wc-checkout.php
[line] => 646
[function] => process_payment
[class] => WM_Woocommerce_Gateway
[type] => ->
[args] => Array
(
[0] => 1804
)
)
[7] => Array
(
[file] => /homepages/17/d555245609/htdocs/Itsaboutmyafrica/wp-content/plugins/woocommerce/includes/class-wc-ajax.php
[line] => 369
[function] => process_checkout
[class] => WC_Checkout
[type] => ->
[args] => Array
(
)
)
[8] => Array
(
[function] => checkout
[class] => WC_AJAX
[type] => ::
[args] => Array
(
[0] =>
)
)
[9] => Array
(
[file] => /homepages/17/d555245609/htdocs/Itsaboutmyafrica/wp-includes/plugin.php
[line] => 496
[function] => call_user_func_array
[args] => Array
(
[0] => Array
(
[0] => WC_AJAX
[1] => checkout
)
[1] => Array
(
[0] =>
)
)
)
[10] => Array
(
[file] => /homepages/17/d555245609/htdocs/Itsaboutmyafrica/wp-admin/admin-ajax.php
[line] => 85
[function] => do_action
[args] => Array
(
[0] => wp_ajax_woocommerce_checkout
)
)
)
[previous:Exception:private] =>
[_code] => 400
)
I used mangopay wordpress plugin 1.0.5 with woocommerce 2.3 and ignitiondeck-crowdfunding
Could you please help me get rid from these errors?
Thanks in advance.
I was having this issue and it turns out that Address is missing. I added
$user->Address = null;
to solve this.
The reason I need to do this is because we are turning our CMS over to a client and we need them to follow the rules but we can't just change the value outright as there is content in the system that breaks the max length rules for some fields and we don't want them to get chopped. So going ahead we just want to target all new content by targeting the new content form (node-form). I currently have a hook that successfully changes the max value for the title below:
function myForm_form_alter(&$form, &$form_state, $form_id) {
if($form['#id'] == 'node-form') {
$form['title']['#maxlength'] = 30;
}
}
I need to add one for a field named "field_feature_desc". I printed the form info to the screen and here is the info I received for that field:
[field_feature_desc] => Array
(
[field_name] => field_feature_desc
[type_name] => article
[display_settings] => Array
(
[weight] => 11
[parent] =>
[label] => Array
(
[format] => above
)
[teaser] => Array
(
[format] => default
[exclude] => 1
)
[full] => Array
(
[format] => default
[exclude] => 1
)
[4] => Array
(
[format] => default
[exclude] => 1
)
[2] => Array
(
[format] => default
[exclude] => 0
)
[3] => Array
(
[format] => default
[exclude] => 0
)
)
[widget_active] => 1
[type] => text
[required] => 0
[multiple] => 0
[db_storage] => 0
[module] => text
[active] => 1
[locked] => 0
[columns] => Array
(
[value] => Array
(
[type] => text
[size] => big
[not null] =>
[sortable] => 1
[views] => 1
)
)
[text_processing] => 0
[max_length] =>
[allowed_values] =>
[allowed_values_php] =>
[widget] => Array
(
[rows] => 5
[size] => 60
[default_value] => Array
(
[0] => Array
(
[value] =>
[_error_element] => default_value_widget][field_feature_desc][0][value
)
)
[default_value_php] =>
[label] => Feature Description
[weight] => -3
[description] => Description text in the feature area on the homepage, if applicable
[type] => text_textfield
[module] => text
)
)
If you have an idea how i would code for this additional field it would be much appreciated. I've been trying the following:
$form['field_feature_desc']['max_length'] = 70;
$form['field_feature_desc']['columns']['value']['length'] = 70;
Sorry if there is already an answer for this question, I looked all over for one and couldn't locate one.
I discovered an array outside of the one i was working with. So the code that did it was:
$form['#field_info'] = array(
'field_feature_desc' => array(
'max_length' => 70,
),
);
Or a shorter version is:
$form['#field_info']['field_feature_desc']['max_length'] = 70;
When adding custom php code for a conditional action, drupal/ubercart provides two php variables ($order and $account) that hold information about the order and account for the checkout that was just completed.
I can't find anywhere on the internet documentation about how these objects are structured...anyone know where this documentation is or how these objects are setup???
thanks
Here's what the $order object looks like on a fairly standard install (might be a bit different depending on your installation. Of course the products in the order dictate what the items section looks like:
stdClass Object
(
[order_id] => 123
[uid] => 456
[order_status] => payment_received
[order_total] => 100
[product_count] => 1
[primary_email] => test#example.com
[delivery_first_name] => Test
[delivery_last_name] => Customer
[delivery_phone] => 123-123-1234
[delivery_company] => ABC Company, Inc.
[delivery_street1] => 123 Easy St.
[delivery_street2] =>
[delivery_city] => Anytown
[delivery_zone] => 39
[delivery_postal_code] => 12345
[delivery_country] => 840
[billing_first_name] => Test
[billing_last_name] => Customer
[billing_phone] => 123-123-1234
[billing_company] => ABC Company, Inc.
[billing_street1] => 123 Easy St.
[billing_street2] =>
[billing_city] => Anytown
[billing_zone] => 39
[billing_postal_code] => 12345
[billing_country] => 840
[payment_method] => credit
[data] => Array
(
[cc_data] => ***encrypted credit card data***
)
[created] => 1295455508
[modified] => 1295457962
[host] => 127.0.0.1
[products] => Array
(
[0] => stdClass Object
(
[order_product_id] => 245
[order_id] => 123
[nid] => 5
[title] => Test Product
[manufacturer] =>
[model] => TEST-PRODUCT-SKU
[qty] => 1
[cost] => 100.00000
[price] => 100.00000
[weight] => 0
[data] => Array
(
[attributes] => Array
(
)
[shippable] => 1
[module] => uc_product
)
[order_uid] => 456
)
)
[payment_details] =>
[quote] => Array
(
[method] => flatrate_1
[accessorials] => 0
[rate] => 7.00000
[quote_form] =>
)
[line_items] => Array
(
[0] => Array
(
[line_item_id] => subtotal
[type] => subtotal
[title] => Subtotal
[amount] => 100
[weight] => 0
[data] =>
)
[1] => Array
(
[line_item_id] => 194
[type] => shipping
[title] => Flat Rate Shipping
[amount] => 7.00000
[weight] => 1
[data] =>
)
)
)
$account is the user object.
$order is the ubercart order object.
There are some minimum defined values for both of these objects, but they can contain anything really. The reason is, that Drupal will allow modules to expand the user object, while ubercart will allow modules to expand the order object.
The best thing to do in such situations is to inspect the objects to figure out how to get to what you need.
The devel module will allow you to pretty print variables using dsm() or dump the variable t a log file using dd(). Those are two ways to get to the variable info.