How could i pass custom mail tokens from my custom module to the admin user settings page.In the admin user settings page I see a part like Welcome, awaiting administrator approval.In this part it shows the available variables are: !username, !site, !password, !uri, !uri_brief, !mailto, !date, !login_uri, !edit_uri, !login_url.Is there any way by which i could add my own custom variables so that it can be accessed in the corresponding mail body..?I need to pass some variables from my custom module to this user setings part.Could some one help me with this..
For someone who might be looking for the solution,here is how i solved it.Do check the link below to see how to create your own tokens in the user admin settings.Its was a very quite useful piece of code .Anyways thanks to the uploader.. :)
http://www.innoraft.com/blog/use-profile-fields-tokens-user-emails-drupal
Related
I have created a custom post type that for the sake of this question we can call "my_cpt".
I have also created a new role which we can call "my_role".
What I want to do is give "my_role" access to "my_cpt" without adding the "edit_posts" capability because that gives access to other post types which I do not want the role to have access to.
I have tried variations of numerous bits of code I have found but none have worked so I don't really know where to begin. Based on that I don't have any base code to display here.
A plugin like this one should enable you to do this: https://www.role-editor.com/
Ended up being easier than I thought.
I created a couple capabilities... "read_my_cpt" and "edit_my_cpt".
The "my_role" has permissions to both the capabilities.
I then just had to change the capability_type for the CPT to "my_cpt" instead of "post"
I am trying to create firebase dynamic links manually but I didn't understand which domain should I provide for 'link' parameter as shown below:
"https://YourDynamicLinkIdentifier.app.goo.gl/link=https://example.com?offer="+myOfferVar+"&apn=com.your.apn";
Here link = www.example.com but I don't have any domain and I am not intended to pass any.
I am just trying to pass a variable with this link so that the end user can receive the passed variable by clicking on the created dynamic link.
I am really stuck with this. Please help me with this.
I want to create a form which send message on multiple email address
can this possible using WordPress?
yes you can. Use wp_mail function. here is refference http://codex.wordpress.org/Function_Reference/wp_mail
just remember there is a search engin called Google.You can easily find these kind of things from Google.You just need to type and hit enter.
Thank you
I need password check function in wordpress for change Password functionlity.I have use wp_check_password( $opass,$pass,$user_id ); function but I got wrong results Any one Help me?
How exactly are you using wp_check_password? According to the codex, the second argument needs to be the encrypted password - are you passing it encrypted?
Take a look at wp_authenticate_username_password in wp-includes/user.php to see how WordPress does it; or even call wp_authenticate_username_password itself.
I'm a Drupal nub. I would like to check on every page if user (anonymouse) agreed to somekind of terms. I suppose i should write small custom module ?
Where will this condition be written
if(!$_COOKIE('confirm')){
//jQuery show confirmation form
//Set cookie for 1hour
}
maybee in page.tpl.php ? Please, give me some tips ..
If you don't want to store the info for a long time, you should use $_SESSION variable. Then in preprocess page you could check if the user has accepted and set a variable that you can use in your page.tpl.php.
user_save() accepts an array argument which you can put custom data into. This will then be loaded with your $user object and you can use in any template file.
Check out these modules:
http://drupal.org/project/legal
http://drupal.org/project/terms_of_use
The Legal and TOS modules are good if you need a login. If working with anonymous users, however, you'll need to use the rules module with https://www.drupal.org/project/rules_session_vars.